This is the main command which opens the license file with the screens and does all the defined license checks. If any error occurs, an EasyGo screen displays the error. See List of Return / Error Codes and Other Errors.
It also validates a module, e.g. tests if there a sufficient licenses for a network module.
Name
|
PrepareAndCheck 
|
Purpose
|
Opens the license file and executes the EasyGo form.
|
Params
|
Parameter
|
Type
|
Example
|
Note
|
license file
|
String
|
F:\mylic.lic
|
The full path to the license file . See details for
|
ProjectSecureKey/ ReadKey
|
String
|
I am a project secure key
|
The project secure key or Read Key for that license 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 or hostname should be used as name for the license. Concurrent User uses a combination of username and PC name.
If the module is an Item Counter, provide the name for the item counter in the field Name and set UseWindowsUser to false.
|
Quit
|
Boolean
|
False
|
Controls whether the Licence Protector object is available (for further calls) an the license 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 license 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 license 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 license (only when using network license per computer, user or concurrent user)
|
1024
|
This is a copy protection violation. The Installation Code of the license file doesn’t match with the %ID%. See
|
2048
|
The file %filename% is not a valid license file or file cannot be opened
See
|
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
|
|
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
|
You can terminate your application if the error code is not 0. 0 means that everything is OK. The activation does not indicate the status of the license (e.g. trial version, activation done) because EasyGo handles everything automatically.
If you need status information about a module, use GetWebActivation, RemainingDays, RemainigLicenses - list of commands to retrieve module information.
If the version expires, the number of licenses are not sufficient or copy protection is violated, this is indicated with an different error code.
You have to set the SecurityLevel before you can use this command
The PrepareAndCheck command would display screens indicating that an online validation is done. The screens can be suppressed using ShowWAStartPage, ShowWAProgressPage and ShowWAResultPage
See also
Module ID
Read Key
Open multiple license files at the same time
Page url:
http://www.helpserver.biz/onlinehelp/lp/easygo/2.6/help2000/index.html?fr_prepare_and_check.htm