

- #GET HARD DRIVE SERIAL NUMBER DELPHI VERIFICATION#
- #GET HARD DRIVE SERIAL NUMBER DELPHI SOFTWARE#
- #GET HARD DRIVE SERIAL NUMBER DELPHI CODE#
#GET HARD DRIVE SERIAL NUMBER DELPHI CODE#
Next, we query the Win32_DiskDrive class:Ĭopy Code // tested in Visual Studio 2019 // Windows 圆4 using System Let's first create an ArrayList to store our HardDrive objects: ArrayList hdCollection = new ArrayList(). Thus, we need to query twice and integrate the information into our HardDrive class. Now there's a problem: the hard drive model is found in the Win32_DiskDrive class and the serial number is found in the Win32_PhysicalMedia class. Put simply, WMI contains a lot information about your hardware. System.Management allows us to access WMI objects. This reference is not provided by default, so you need to add it.Īdd a "using System.Management " at the top of your source code. Scroll down to System.Management under ComponentName. But at least we keep the regular hard-drive formatters happy! The Codeįirst, let's create a class to store information about a hard drive: Of course, if people buy new hard drive, we have a problem. This value won't change even if you format your Hard Drive. BackgroundĪ better solution is to get the Hard Drive Serial Number given by the Manufacturer. This is not a good choice, as later we all find out that every time we format the same hard drive, a new Volume Serial Number is generated.
#GET HARD DRIVE SERIAL NUMBER DELPHI SOFTWARE#
One method programmers have used since the DOS era was to bind their software to the Hard Drive Volume Serial Number.

For the rest of us, we have to think of other ways. Of course, only big companies with big clients can afford to do this.
#GET HARD DRIVE SERIAL NUMBER DELPHI VERIFICATION#
This 1% is the verification algorithm to confirm only valid users can use the program this is commonly known as “activation.”Īctivation is good, but it means our software users will need to have Internet access and that means small programmers like us have to set up a server that can validate users. He suggested that we give users 99% of our software, but keep the remaining 1% to ourselves. My professor once said that we shouldn’t give 100% of our code to the users because there are people out there that are smart enough to decompile our programs and find the various verification algorithms used.

Making sure your software is used by legal buyers is a concern for programmers around the world.
