See Codeproject
See Codeproject
[source:Cprogramming]
you could check out DispHelper, especially the wmi.c sample. DispHelper allows you to use the WMI scripting interfaces, which are vastly easier to use than the C/C++ interfaces.
This is a simple sample to show how to get drive serial numbers.