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

前端 未结 3 2110
小鲜肉
小鲜肉 2021-02-09 09:41

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条回答
  • 2021-02-09 10:14

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

    0 讨论(0)
  • 2021-02-09 10:23

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

    0 讨论(0)
  • 2021-02-09 10:24

    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.

    0 讨论(0)
提交回复
热议问题