WMI Win32_PhysicalMedia SerialNumber is sometimes hexadecimal and sometimes in reversed byte order
I am using WMI with C++ to get the physical disk serial number.
On Windows 7 64bit, I get a string with the serial number.
While when running the same application on a Windows XP 64bit machine I get a hexadecimal string with each char's values reversed开发者_StackOverflow社区.
I have noticed 3 different behaviours so far:
- Windows 7 64bit String in correct order as expect
- Windows XP 64bit(Machine 1) Hexadecimal string, reversed byte order
- Windows XP 64bit(Machine 2) String in reversed byte order
I have used wbemtest.exe and have confirmed that these results are coming from WMI, not my own code.
When I use DeviceIOControl and get the SMART information I always get the serial number as a hexadecimal string with reversed byte order.
Is this expected behavior and how does one handle this?
精彩评论