Get the Processor type and number of processors : CPU Processor « Windows API « VBA / Excel / Access / Word






Get the Processor type and number of processors

 

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
    Debug.Print "Number of processors: " & lpSysInfo.dwNumberOfProcessors
    Debug.Print "Processor type: " & lpSysInfo.dwProcessorType
End Sub

 








Related examples in the same category

1.Get CPU Processor Information