检测32位或64位Windows [英] Detect 32-bit or 64-bit of Windows

查看:147
本文介绍了检测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 。它告诉你的32位应用程序是否在64位Windows上运行。

The function to call is IsWow64Process. 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆