Here is an reasonably decent way to do it what I have come up with.
The advantage is that you can create a reg keyfile in your software based on
the users HD serial number, but there is no need for you to get any
information from the user.
This provides security for entering a time-limited registration key only.
What you need to do is then provide your own registration code as per if the
registration is accepted I use the Gethdserialnumber to ensure that when the
time limited registration key is entered, the reg key that is generated onto
the HD is not compromised by copying:

procedure TCamForm.GetRegClick(IceString:string);
var
  datetimenow, getRegDT: cardinal;
  Dres: integer;
begin
  getRegDT := decrypt(IceString, KeyA, KeyB); //crc32 with KeyA/B as
constants
  DateTimeNow := round(now);
  DRes := DateTimeNow - getRegDT;
  if (DRes > -2) and (DRes <= 7)
//allowable registration input time in days -1 allows for timezone
differences
//in this case, if registration key is entered after 7 days, it is not
accepted.
  begin
    //make and save your registration key here
    MessageDlg('CamSnap) is registered - thank you.', mtCustom, [mbOK], 0);
  end
  else MessageDlg('Registration error!', mtWarning, [mbOK], 0); //allowable
dateframe exceeded
end;

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to