Question

I've got a Win32 process that is compiled and packaged in both 32-bit (x86) and 64-bit (x64) variants. I'd like the x86 variant to refuse to run on a 64-bit version of Windows (i.e. WOW64).

Is there any way to do this by setting linker flags? If not, what do I need to do?

Was it helpful?

Solution

You can check whether you're running under emulation by calling IsWow64Process. Note, that you may need to load the function dynamically if you want to support older versions the OS.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top