You can also use WINAPI
add
using System.Runtime.InteropServices;
in using section
-- BEGIN CODE --
[StructLayout(LayoutKind.Sequential)]
public struct SYSTEM_INFO
{
public uint dwOemId;
public uint dwPageSize;
public uint lpMinimumApplicationAddress;
public uint lpMaximumApplicationAddress;
public uint dwActiveProcessorMask;
public uint dwNumberOfProcessors;
public uint dwProcessorType;
public uint dwAllocationGranularity;
public uint dwProcessorLevel;
public uint dwProcessorRevision;
}
[DllImport("kernel32")]
static extern void GetSystemInfo(ref SYSTEM_INFO pSI);
private uint GetNuberOfProcessors()
{
SYSTEM_INFO info = new SYSTEM_INFO();
GetSystemInfo(ref info);
return info.dwNumberOfProcessors;
}
-- END CODE --
hope this helps
--
Milosz Skalecki
MCP, MCAD
Kevin Jackson said:
Hello,
How does one go about determining the number of processors a server has
in
..NET???
Thanks