home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / RKEY12.ZIP / RKBRAND.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1991-01-21  |  1.1 KB  |  46 lines

  1. PROGRAM RkGenKey;
  2.  
  3. {
  4.  This is a sample program using rKey.  It is a sample of a software
  5.  branding program that would be used by the user to enter their name
  6.  and registration key and create a key file.  This sample will create
  7.  a key file for the RkSample program, using a registration key which
  8.  would be generated by the programmer using the RkGenKey program.
  9. }
  10.  
  11.  
  12. USES
  13.   rKey;     { to use StrLib change rKey to rKeyS }
  14.  
  15.  
  16. CONST
  17.   RkBrandVer = '1.3';
  18.  
  19.  
  20. VAR
  21.   n : STRING[36];
  22.   k : STRING[12];
  23.  
  24.  
  25. BEGIN
  26.   OwnerCode := 'ArgleBarbWotsLeeb';
  27.   ProgramCode := 'RkSample Two';
  28.   KeyFileName := 'RKSAMPLE';
  29.   WriteLn('RkBrand v' + RkBrandVer);
  30.   WriteLn('Software Branding Program for RkSample v2.x');
  31.   WriteLn('(c) 1990 TrendSoft, Inc.');
  32.   WriteLn;
  33.   Write('Enter name of person to register : ');
  34.   ReadLn(n);
  35.   WriteLn;
  36.   Write('Enter registration key : ');
  37.   ReadLn(k);
  38.   WriteLn;
  39.   IF NOT ValidKey(n,0,k) THEN
  40.     WriteLn('Invalid registration key!')
  41.   ELSE BEGIN
  42.     Register(n,0,k);
  43.     WriteLn('RkSample now registered to ' + RegName);
  44.   END;
  45. END.
  46.