简体   繁体   中英

Does GetVolumeInformation() returns a unique volume serial number?

The documentation for GetVolumeInformation() says:

This function returns the volume serial number that the operating system assigns when a hard disk is formatted. To programmatically obtain the hard disk's serial number that the manufacturer assigns, use the Windows Management Instrumentation (WMI) Win32_PhysicalMedia property SerialNumber.

Does Windows assigns a unique volume serial number, or could multiple machines have the same volume serial number?

The volume serial number is a DWORD . There are 2 32 different possible values of a DWORD . Therefore it stands to reason that since there are a finite number of possible values, and an unbounded number of volumes in the world, that there could be multiple volumes sharing the same serial number.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM