tags:

views:

452

answers:

2

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).

+2  A: 

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.

unwind
+1  A: 

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

But I could only find this example in vb

Preet Sangha