I am using WMI with C ++ to get the serial number of a physical disk.
On Windows 7 64bit, I get a string with a serial number.
While running the same application on a 64-bit Windows XP machine, I get a hexadecimal string with each changed char value.
I noticed 3 different behaviors:
- Windows 7 64bit String in the correct order, as expected
- Windows XP 64bit (machine 1) Hexadecimal string, reverse byte order
- Windows XP 64bit (machine 2) String in reverse byte order
I used wbemtest.exe and confirmed that these results come from WMI, not my own code.
When I use DeviceIOControl and get SMART information, I always get the serial number as a hexadecimal string with reverse byte order.
Is this the expected behavior and how does it cope with it?
source
share