Jump to content
Sign in to follow this  
czyt

_GetMemType get memory Type(generation)

Recommended Posts

czyt

Sorry for my bad English!may it helps someone!

; #FUNCTION# ====================================================================================================================
; Name ..........: _GetMemType
; Description ...: Get mem Type
; Syntax ........: _GetMemType()
; Parameters ....: None
; Return values .: None
; Author ........:czyt (虫子樱桃)
; Modified ......:
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: MsgBox(0,'',_GetMemType())
; ===============================================================================================================================
Func _GetMemType()
    $ObjMem = ObjGet('winmgmts:\\' & @ComputerName)
    $ObjMemdata = $ObjMem.InstancesOf("Win32_PhysicalMemory")
    Local $Speed, $DDRType
    For $t In $ObjMemdata
        If $t.Speed > 0 Then
            $Speed = $t.Speed
            ExitLoop
        EndIf
    Next
    Switch $Speed
        Case $Speed < 400
            $DDRType = 'DDR1'
        Case $Speed > 400 And $Speed < 800
            $DDRType = 'DDR2'
        Case $Speed > 800
            $DDRType = 'DDR3'
    EndSwitch
    Return $DDRType
EndFunc   ;==>_GetMemType

董小姐,你微笑的时候很美,就像安河桥下,清澈的水...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.