Andrew Truckle
Andrew Truckle

Reputation: 19197

Getting system info using WMI

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:

The others?


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


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 ...

Upvotes: 0

Views: 57

Answers (0)

Related Questions