I want to add "number of processors" to my license control system. I know I
can use Environment.GetEnvironmentVariable() to check for the environment
variable NUMBER_OF_PROCESSORS, but I do not know how easy this might be to
fake. Would I be better off using a Win32 sdk call to GetSystemInfo? Is
there a better way? Which is more reliable? Which is more portable?

Thanks!

Re: Detecting number of processors by Jared

Jared
Fri Jun 25 11:34:29 CDT 2004

I would imagine that calling GetSystemInfo() is more reliable. It is really
easy to change an evironment variable before launching your program.

--
Jared Parson [MSFT]
jaredpar@online.microsoft.com

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"Stephen Walch" <swalch@proposion.com> wrote in message
news:#G3YvupWEHA.1152@TK2MSFTNGP09.phx.gbl...
> I want to add "number of processors" to my license control system. I know
I
> can use Environment.GetEnvironmentVariable() to check for the environment
> variable NUMBER_OF_PROCESSORS, but I do not know how easy this might be to
> fake. Would I be better off using a Win32 sdk call to GetSystemInfo? Is
> there a better way? Which is more reliable? Which is more portable?
>
> Thanks!
>
>