开发者

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:

  1. Windows 7 64bit String in correct order as expect
  2. Windows XP 64bit(Machine 1) Hexadecimal string, reversed byte order
  3. 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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜