private static string GetProcessorArchitecture() { var lpSystemInfo = new SYSTEM_INFO(); NativeMethods.GetSystemInfo(ref lpSystemInfo); switch (lpSystemInfo.wProcessorArchitecture) { case 0: return "x86"; case 6: return "IA64"; case 9: return "AMD64"; default: return "MSIL"; } }
internal static extern void GetSystemInfo(ref SYSTEM_INFO lpSystemInfo);