In C #, how can I find out programmatically if the operating system is x64 or x86
I found this API method on the Internet, but it does not work
[DllImport("kernel32.dll")] public static extern bool IsWow64Process(System.IntPtr hProcess, out bool lpSystemInfo); public static bool IsWow64Process1 { get { bool retVal = false; IsWow64Process(System.Diagnostics.Process.GetCurrentProcess().Handle, out retVal); return retVal; } }
Thanks in advance.
Homam source share