HDD serial number flipped every 2 bytes in Windows XP, Vista and 7 but not in Windows 8

后端 未结 5 1468
一生所求
一生所求 2021-02-19 05:25

I need to get HDD serial number to use it as a key for licensing a software. I used diskid32 code in this url: http://www.winsim.com/d

5条回答
  •  无人共我
    2021-02-19 06:00

    I use the same approach (and same code) in my software licensing. Yes, Windows 8 for some reason is returning flipped values for this method, I can't say why (so I can't answer your question).

    My solution is the one that you pointed out: Flip the values again. So, after calling the "flipAndCodeBytes", you could test if is a Windows 8 OS, and flip the values.

    In my case, it's working now (I got the same values for Windows XP/Vista/7 and Windows 8).

    Good luck!

提交回复
热议问题