Is there a way to determine how many cores a machine has from C/C++ in a platform-independent way? If no such thing exists, what about determining it per-platform (Windows/*
you can use WMI in .net too but you're then dependent on the wmi service running
etc. Sometimes it works locally, but then fail when the same code is run on servers.
I believe that's a namespace issue, related to the "names" whose values you're reading.