Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System ID detection.

Status
Not open for further replies.

delphiman

Programmer
Dec 13, 2001
422
ZA
In order to prevent piracy of my (licensed) software I need my software to be able to identify the user's system.

How can I do this?

My thoughts are that if I could read the user's MS-Windows License No this would help. Because the user would have to provide it upon my granting him MY licence.

How can I identify his MS License No without "infringing privacy" etc. etc.?
 
hi,

The serial number of windows isn't always unique, if they copy your programma, they will probably copy windows also. One of the things that is unique is the harddsik serial number. So we use this number to avoid piracy. I have the code included.

Steph.

function GetHardDiskSerial(const DriveLetter: Char): string;
var
NotUsed: DWORD;
VolumeFlags: DWORD;
VolumeInfo: array[0..MAX_PATH] of Char;
VolumeSerialNumber: DWORD;
begin
GetVolumeInformation(PChar(DriveLetter + ':\'),
nil, SizeOf(VolumeInfo), @VolumeSerialNumber, NotUsed,
VolumeFlags, nil, 0);
Result := Format('Label = %s VolSer = %8.8X',
[VolumeInfo, VolumeSerialNumber])
end;


procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage(GetHardDiskSerial('c'));
end;

 
Thanks to you ... and this great website!!

Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top