Mega Code Archive

 
Categories / VisualBasic Script / Windows API
 

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