Getting system info using WMI

29 views Asked by At

Take this code:

SYSTEM_INFO siSysInfo{};
GetSystemInfo(&siSysInfo);

strHardwareInfo.AppendFormat(L"  %s: %u\r\n", L"Number of processors", siSysInfo.dwNumberOfProcessors);
strHardwareInfo.AppendFormat(L"  %s: %u\r\n", L"Page size", siSysInfo.dwPageSize);
strHardwareInfo.AppendFormat(L"  %s: %lx\r\n", L"Minimum application address", siSysInfo.lpMinimumApplicationAddress);
strHardwareInfo.AppendFormat(L"  %s: %lx\r\n", L"Maximum application address", siSysInfo.lpMaximumApplicationAddress);
strHardwareInfo.AppendFormat(L"  %s: %u\r\n", L"Active processor mask", siSysInfo.dwActiveProcessorMask);

What are the WMI equivalents? I know the first one is:

  • Win32_Processor. NumberOfLogicalProcessors

The others?


I thought that Win32_PageFileUsage.AllocatedBaseSize might have been the equivalent of dwPageSize in the structure. But it is not:

  • 2048 (Win32_PageFileUsage.AllocatedBaseSize)
  • 4096 (SYSTEM_INFO.dwPageSize)

For example, GetSysInfo returns:

  Number of processors: 8
  Page Size: 4096
  Minimum application address: 10000
  Maximum application address: fffeffff
  Active processor mask: 255

But msinfo says:

enter image description here

Don't get it ...

0

There are 0 answers