7

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?

Omnifarious
  • 54,333
  • 19
  • 131
  • 194
M.Rezaei
  • 992
  • 3
  • 11
  • 28

3 Answers3

5

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.

ur.
  • 2,890
  • 1
  • 18
  • 21
3

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

Steve Rowe
  • 19,411
  • 9
  • 51
  • 82
0

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