c#判断程序自身是运行在32位还是64位状态
可以直接用Environment.Is64BitProcess,不过需要DotNet4.0或以上版本。或者用以下方法[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool IsWow64Process([In] IntPtr hProcess, [Out] out bool lpSystemInfo); private stati