home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
PASCAL
/
RKPLUS33
/
RKPDEMO
/
REGISTER.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-10-19
|
1KB
|
62 lines
Program Register;
{
This is a sample programme using RkPlus. It is a sample of a software
registration programme that would be used by the user to enter their name
and registration key and create a key file. This sample will create
a key file for the Sample1 programme, using a registration key which
would be generated by the programmer using the GenKey programme.
Register uses the example encoding unit Encode.
}
Uses
Crt,
RkPlus,
Encode;
Const
MonthNames : Array[1..12] of String[3]
= ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
Var
kc : Char;
Begin
SetProgID('Sample');
SetKeyFile('Sample');
WriteLn('Register');
WriteLn('Software Registration Programme for Sample1');
WriteLn('See RKPLUS.DOC for more info');
WriteLn;
Write('Enter name of person to register : ');
ReadLn(Rkp.Name1);
WriteLn;
Write('Enter the registration key : ');
ReadLn(Rkp.Key);
WriteLn;
Rkp.ID := '(c) Serious Cybernetics';
Rkp.Message := 'Register';
Rkp.Name2 := '';
Rkp.Name3 := '';
Rkp.Level := 0;
VerifyKey;
If Not Rkp.Registered then Begin
Rkp.Level := 1;
VerifyKey;
End;
If Not Rkp.Registered then
WriteLn('Invalid key!')
Else Begin
SaveRegInfo;
If RkpOK then
WriteLn(KeyFileName,' created.')
Else
WriteLn('Error ',RkpError,' creating file.');
End;
End.