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?
-
3What platform? What API?EboMike– EboMike2010年11月23日 05:50:55 +00:00Commented Nov 23, 2010 at 5:50
-
5There is no way to do it in standard C++. It has to be done in a platform specific way, so you need to specify which OS you're using.Charles Salvia– Charles Salvia2010年11月23日 05:50:58 +00:00Commented Nov 23, 2010 at 5:50
-
My platform in windows xp and windows 2003 serverM.Rezaei– M.Rezaei2010年11月23日 05:57:11 +00:00Commented Nov 23, 2010 at 5:57
3 Answers 3
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.
Comments
GetSystemInfo will get you started with the CPU information. Each subsystem generally has different query functions.
Comments
The standard c++ don`t provide this for you. These api may be provided by os or hardware driver.
2 Comments
Explore related questions
See similar questions with these tags.