Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Win32 进程,它在 32 位 (x86) 和 64 位 (x64) 变体中编译和打包。我希望 x86 变体拒绝在 64 位版本的 Windows(即 WOW64)上运行。
有没有办法通过设置链接器标志来做到这一点?如果没有,我需要做什么?
您可以通过调用IsWow64Process检查您是否在仿真下运行。请注意,如果您想支持旧版本的操作系统,您可能需要动态加载该函数。