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 ve开发者_JS百科rsion of Windows (i.e. WOW64).
Is there any way to do this by setting linker flags? If not, what do I need to do?
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.
精彩评论