如何在Windows使用C ++获取硬件信息? [英] How to get hardware information in Windows using C++?
问题描述
如何在c ++中获取硬件信息(例如cpuId,biosId,diskId,baseId和videoId)?
How to get hardware information (for example cpuId, biosId, diskId, baseId and videoId) in c++?
任何人都可以给我一个示例Visual Studio项目?
Can anyone give me an example visual studio project for this?
推荐答案
有非常不同的方法来获取磁盘ID(序列号?卷ID? ..。我想你想建一个电脑的指纹。
最舒适的方法是使用Windows Management Instrumentation(WMI)并访问 DMI 。有关开始,请参见 MSDN 。
请参见 MSDN此处了解如何获取主板序列号为例。
There are very different ways to get a disk id (serial number? volume id?) or a CPU ID or ... . I think you want to build a fingerprint of the computer. The most comfortable way is to use Windows Management Instrumentation (WMI) and access the DMI . See MSDN for a start. See MSDN here for a hint how to get the mainboard serial number as an example.
这篇关于如何在Windows使用C ++获取硬件信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!