Name
|
PrepareAndCheck 
|
Purpose
|
Opens the licence file and executes the EasyGo form.
|
Params
|
Parameter
|
Type
|
Example
|
Note
|
Licence file
|
String
|
F:\mylic.lic
|
The full path to the licence file . See details for
|
ProjectSecureKey/ ReadKey
|
String
|
I am a project secure key
|
The project secure key or Read Key for that licence file.
See details - Read Key
|
ModuleID
|
String
|
D1001
|
Unique ModuleID – identifies the module to be tested in EasyGo functionality - see details main module
|
Name
|
String
|
Tom
|
The user or item name to check the module for. Normally, you would pass this information only if you have an own user administration. Default option is to use the automatic function - UseWindowsUser
|
UseWindowsUser
|
Boolean
|
False
|
Determines if the windows login name should be used as name. If it is a licence per PC the PC name is used. Concurrent User uses a combination of username and PC name.
|
Quit
|
Boolean
|
False
|
Controls whether the Licence Protector object is available (for further calls) an the licence file is not closed or if it is not needed any more and therefore quit.
On false (no quit) the Quit has to be made explicitly at end of the application. For concurrent user testing quit must be set to false. If you need any other testing after PrepareAndCheck also set quit to false
|
TagValue
|
String, output
|
Empty
|
A variable which can absorb the Tag value of the main module. For details see Using the TAG value (Anti Hacker Strategies)
|
|
Returncode
|
Returncode
Type Integer
|
Note
|
0
|
The licence file was successfully opened and the main module was successfully checked or even activated. It is also possible that the main module is in an evaluation state.
|
2
|
The licence file could not be found or was not opened
|
4
|
EasyGo screen terminated by closing the screen with X (close button)
|
32
|
No more free licence (only when using network licence per computer, user or concurrent user)
|
16382
|
If CheckSysdateChanges is set to true and Licence Protector recognizes that the date was manipulated then you get this error code.
|
Other return codes
|
Prepare or Validate failed, see list of return codes in the Advanced Developer Documentation).
|
|
Usage
|
Important function in order to use the Licence Protector
|
Sample
|
iRes := lic.PrepareAndCheck(sMyLicfile, ‘I am a project secure key’, ‘D1001’, ‘’, true, false, sTagVariable);
if iRes <> 0 then
begin
<< an error occurred >>
...
end
else
begin
<< everything is fine, continue >>
...
|
See also
|
EasyGo, SetRegisterSettings, SetRegisterHelp, SysdateChanged, CheckSysdateChanged, Validate, ValidateEx, Quit, PrepareForce, PrepareAdvanced
|