本文介绍了检测 32 位或 64 位 Windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想检测当前的 Windows 操作系统是 32 位还是 64 位.如何使用 C++ 实现它?我不想要处理器类型我想要操作系统的位类型.这是因为您可以在 64 位处理器上安装 32 位操作系统.
I want to detect whether the current Windows OS is 32-bit or 64-bit. How to achieve it using C++? I don't want processor type I want OS's bit type. This is because you can install 32-bit OS on 64-bit processor.
推荐答案
调用的函数是IsWow64Process
或 IsWow64Process2
.它会告诉您的 32 位应用程序是否在 64 位 Windows 上运行.
The function to call is IsWow64Process
or IsWow64Process2
. It tells your 32-bit application if it is running on a 64 bit Windows.
如果程序编译为 64 位,它就会知道.
If the program is compiled for 64 bits, it will already know.
这篇关于检测 32 位或 64 位 Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!