views:

305

answers:

2

GetSystemInfo will give you the number of physical CPUs / cores, but I would like to know the total number of virtual CPUs. I.e. on the new Nahelam chips, they have 4 cores, but appear as 8 cpus.

If GetSystemInfo doesn't give this information, what API do I need (I've seen a function for getting number of logical processors, but it is Vista only. I need to support XP)?

+2  A: 

GetLogicalProcessorInformation Function ( Windows Vista, Windows XP Professional x64 Edition, Windows XP with SP3)

aJ
Hi, we have to support a base install of WindowsXP. I guess I'll just have to use GetSystemInfo as a backup in that case.
Mark Ingram
A: 

Use NAPI (Win32 FAQ)