I tried this but it will shows number of logical processors only
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
int numCPU = sysinfo.dwNumberOfProcessors;
I tried this but it will shows number of logical processors only
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
int numCPU = sysinfo.dwNumberOfProcessors;
From https://msdn.microsoft.com/en-us/library/windows/desktop/ms724958(v=vs.85).aspx:
Note For information about the physical processors shared by logical processors, call GetLogicalProcessorInformationEx with the RelationshipType parameter set to RelationProcessorPackage (3).
You can get the related hardware of the logical processors, and infer how many physical processors are there