>> Infinity08, I used it on a intel multicore processor and it gives correctly the number of cores.
Ok.
But if you're going with an MS function, then this one might be more useful :
GetLogicalProcessorInforma
tion :
http://msdn.microsoft.com/en-us/library/ms683194%28v=VS.85%29.aspx