我怎样才能动态地获得系统架构? [英] How can I dynamically get the system architecture?

查看:199
本文介绍了我怎样才能动态地获得系统架构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

那么正如标题所说

有没有什么办法让系统架构中的C ++?

is there any way to get the system architecture within c++?

谢谢!

推荐答案

根据动态和的Visual C ++,我会想你想在Windows下运行的时间做到这一点。

Based on "dynamically" and "Visual C++", I'm going to guess you want to do this at run-time under Windows.

在这种情况下,您可以使用 的GetSystemInfo 或的 GetNativeSystemInfo 检索有关系统和处理器的一些基本信息。如果您需要了解它支持的处理器和特定功能的更多信息,你可以使用的 IsProcessorFeature present 找到他们(虽然它可能是一个有点尴尬用于此目的 - 你要问关于每个独立功能,并为每个布尔答案)。

In that case, you can use GetSystemInfo or GetNativeSystemInfo to retrieve some basic information about the system and processor. If you need more information about the processor and specific features it supports, you can use IsProcessorFeaturePresent to find them (though it can be a little awkward for this purpose -- you have to ask about each feature individually, and gives a Boolean answer for each).

这篇关于我怎样才能动态地获得系统架构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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