How to get hardware information in Windows using C++?

自闭症网瘾萝莉.ら 提交于 2019-12-20 23:30:24

问题


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?


回答1:


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.




回答2:


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




回答3:


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



来源:https://stackoverflow.com/questions/4253164/how-to-get-hardware-information-in-windows-using-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!