I need a C/C++ console-application using Win32 API that enumerates the hard disks on the local computer, and reports S.M.A.R.T status for each SATA hard disk that supports it.
The output of the program should be a XML string like the following. It's ok if it does not report the NAME of each attribute (as they could be different for different hard disk vendors). I am also not rigid about the exact XML format, but am looking for all the information depicted.
<DISKS>
<DISK ID="0" TYPE="SATA" SMARTENABLED="1" MODEL="FUJITSU MHV2060AH" FIRMWARE="00000096" SERIAL="NT25T22222">
<SMARTDATA DISKID="0" ATTREV="16" THRREV="16">
<ATTRIB ID="1" NAME="Raw Read Error Rate" VALUE="100" RAWBYTES="[240][40][2][0][0][0]" RAW="141552"/>
<ATTRIB ID="2" NAME="Throughput Performance" VALUE="100" RAWBYTES="[0][0][19][1][0][0]" RAW="18022400"/>
<ATTRIB ID="3" NAME="Spin Up Time" VALUE="100" RAWBYTES="[1][0][0][0][0][0]" RAW="1"/>
<ATTRIB ID="4" NAME="Start/Stop Count" VALUE="99" RAWBYTES="[190][3][0][0][0][0]" RAW="958" />
<ATTRIB ID="5" NAME="Reallocated Sector Count" VALUE="100" RAWBYTES="[0][0][0][0][208][7]" RAW="0" />
<ATTRIB ID="7" NAME="Seek Error Rate" VALUE="100" RAWBYTES="[117][14][0][0][0][0]" RAW="3701" />
<ATTRIB ID="8" NAME="Seek Time Performance" VALUE="100" RAWBYTES="[0][0][0][0][0][0]" RAW="3701"/>
...
</SMARTDATA>
</DISK>
<DISK ID="1" TYPE="SATA" SMARTENABLED="1" MODEL="aaaaa" FIRMWARE="000000226" SERIAL="22T22222">
<SMARTDATA DISKID="1" ATTREV="16" THRREV="16">
...
</SMARTDATA>
</DISK>
</DISKS>
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
Windows 2000, XP, 2003