C + + Get Hard drive serial number

Source: Internet
Author: User

Recently in contact with the Software registration module, you need to obtain the hard drive serial number to generate the registration code.

HDD serial number, English name: Hard disk Serial number, which is the drive manufacturers to differentiate products and set, is unique. Search the Internet, found that the code to get the hard drive serial number is everywhere, but many are wrong. A typical representation is to use the GetVolumeInformation function to get the serial number. This method obtains the serial number of the volume, that is, volume Serial. This serial number will change after the hard drive is formatted. This article describes the method of acquiring a physical serial number that is unique to the hard disk.

How to get the hard drive serial number: https://www.winsim.com/diskid32/diskid32.html, if the error C2011 when compiling, That's because some of the structure and winioctl.h in the code are heavy, and you can delete the diskid32 inside.

C + + Get Hard drive serial number

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.