2009-03-31 5 views

답변

5

당신은 WMI를 사용하여이 작업을 수행 할 수 있습니다

Dim devlist as object 
Dim dev as object 
Dim totalRAM as long 
Dim numChips as long 
Set devlist = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("SELECT * FROM Win32_LogicalMemoryConfiguration") 
numChips = 0 
For Each dev In devlist 
    numChips = numChips + 1 
    totalRAM = totalRAM + CLng(dev.TotalPhysicalMemory) 
Next 
devlist = Nothing 
MsgBox "RAM: NumChips = " & numChips & ", Total = " & (totalRAM/1024) & "MB" 
+0

는 downvoter 코멘트를 남겨주세요 것입니다. –