How to get hardware information in Windows using C

2020-06-04 04:04发布

How to get hardware information (for example cpuId, biosId, diskId, baseId and videoId) in c++?

Can anyone give me an example visual studio project for this?

3条回答
放荡不羁爱自由
2楼-- · 2020-06-04 04:48

GetSystemInfo will get you started with the CPU information. Each subsystem generally has different query functions.

查看更多
可以哭但决不认输i
3楼-- · 2020-06-04 04:59

The standard c++ don`t provide this for you. These api may be provided by os or hardware driver.

查看更多
男人必须洒脱
4楼-- · 2020-06-04 05:03

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.

查看更多
登录 后发表回答