public static int Main() { SYSTEM_INFO si = new SYSTEM_INFO(); try { GetSystemInfo(ref si); } finally { Console.WriteLine(si._dwNumberOfProcessors.ToString() + " processor(s) found"); Console.WriteLine("Allocation granularity is " + si._dwAllocationGranularity.ToString() + " for this system."); } return 100; }
public extern static void GetSystemInfo(ref SYSTEM_INFO si);