본문 바로가기
VBA

kernel32 사용하여 시스템 정보 가져오기

by SpeeDr00t 2016. 7. 11.
반응형

kernel32 사용하여 시스템 정보 가져오기




Private Declare Sub GetSystemInfo Lib "kernel32" (lpSystemInfo As SYSTEM_INFO)

Type SYSTEM_INFO
   dwOemID As Long
   dwPageSize As Long
   lpMinimumApplicationAddress As Long
   lpMaximumApplicationAddress As Long
   dwActiveProcessorMask As Long
   dwNumberOfProcessors As Long
   dwProcessorType As Long
   dwAllocationGranularity As Long
   dwReserved As Long
End Type

Sub DisplaySystemInfo()
    Dim lpSysInfo As SYSTEM_INFO
    GetSystemInfo lpSysInfo
    
    MsgBox "Number of processors: " & lpSysInfo.dwNumberOfProcessors & " , Processor type: " & lpSysInfo.dwProcessorType
End Sub

Sub test1()

DisplaySystemInfo

End Sub


반응형

'VBA' 카테고리의 다른 글

ComputerName 가져오기  (0) 2016.07.11
shell 사용하기  (0) 2016.07.11
Len(String)  (0) 2016.07.10
Left(string,length)  (0) 2016.07.10
LCase(string)  (0) 2016.07.10