Get HDD (and NOT Volume) Serial Number on Vista Ultimate 64 bit

后端 未结 7 1279
忘掉有多难
忘掉有多难 2020-12-28 10:05

I was once looking for getting the HDD serial number without using WMI, and I found it. The code I found and posted on StackOverFlow.com works very well on 32 bit Windows, b

相关标签:
7条回答
  • 2020-12-28 10:55

    You might want to use Windows unmanaged API to do this:

    call GetVolumeInformation api with proper struct and find VolumeSerialNumber integer field.

    This API is there for ages and was working for me since Windows 98. Unfortunately, can't check it on x64.

    Can you see the correct serial number using other Windows tools? By the way: '0' is a valid serial number! This might happen if disk image was restored from backup or something like that.

    0 讨论(0)
提交回复
热议问题