Marcus Tik
Marcus Tik

Reputation: 1801

How to get the uuid of the mainboard with c

I need a code snippet for reading the mainboard uuid in c (in Windows XP and Windows Vista if there is a difference, else just for Windows).

Upvotes: 1

Views: 3595

Answers (2)

Preet Sangha
Preet Sangha

Reputation: 65506

You can get it from WMI. Try this link for WMI via c/c++

But I could only find this example in vb

Upvotes: 1

unwind
unwind

Reputation: 399843

This MSDN example shows how to use Windows Management Instrumentation APIs to read information about the local computer. It doesn't access the "UUID" (which I guess would be the motherboard's serial number) directly, but it should be possible to get there by modifying the example.

Also notice the Win32_BaseBoard WMI class, it has a SerialNumber member.

Upvotes: 3

Related Questions