Dim envVars As Collections.IDictionary =
System.Environment.GetEnvironmentVariables()
envVars.Item("NUMBER_OF_PROCESSORS") = 2
System.Environment.GetEnvironmentVariable("NUMBER_OF_PROCESSORS")
now the result is 2
So, is possible to get the REAL number of processors?
In a "license per processor" the GetEnvironmentVariable() would be not
useful.
Another possibility is to use WMI. The WMI
class Win32_ComputerSystem has a field NumberOfProcessors.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.