Sign in to follow this  
Followers 0
czyt

_GetMemType get memory Type(generation)

1 post in this topic

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  
Followers 0