Runtime check if you are using a 64-bit application:
To find out if your process is 64-bit or 32-bit, you can simply check IntPtr.Size or any other type of pointer. If you get 4, then you are working on 32-bit. If you get 8, you are working on a 64-bit basis.
What type of your computer works like:
You can check the PROCESSOR_ARCHITECTURE environment variable to make sure that you are running on an x64, ia64 or x86 machine.
Does your process work under emulation:
The Win32 API IsWow64Process will tell you if you are using a 32-bit application under x64. Wow64 means Windows32 on windows64.
Unlike other posted posts: IsWow64Process will not tell you if you are using a 32-bit or 64-bit application. On 32-bit machines, it will tell you FALSE for 32-bit applications at startup, and on a 64-bit machine, it will tell you TRUE for a 32-bit application. It only reports if your application is running under emulation.
Brian R. bondy
source share