Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 796
M.Rezaei Avatar asked Nov 23 '10 05:11

M.Rezaei


People also ask

How do I find my hw information?

To open up System Information, hit Windows+R, type “msinfo32” into the “Open” field, and then hit Enter. The “System Summary” page you open up to already provides a lot more information than we saw in the Settings app.

How do I find system information in Windows?

Type info in the search box on your taskbar, and then select System Information.


2 Answers

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.

like image 63
ur. Avatar answered Oct 01 '22 21:10

ur.


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

like image 32
Steve Rowe Avatar answered Oct 01 '22 20:10

Steve Rowe