Some compilers (known for Visual Studio C++ 2007 an newer) crash when using PrepareAndCheck. The reason is the tag value parameter. Use PrepareAndCheckNT instead. The command has the same parameters but no tag value parameter.
Name
|
PrepareAndCheckNT 
|
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 UNC pathnames
|
ProjectSecureKey/ ReadKey
|
String
|
I am a project secure key
|
The project secure key for that license file.
See details - Read Key
Note: Using a PSK is supported for backward compatibility but should not be used.
|
ModuleID
|
String
|
QHD001
|
Unique ModuleID – identifies the module to be tested in EasyGo functionality - see details main module
|
Name
|
String
|
|
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 = true
|
UseWindowsUser
|
Boolean
|
True
|
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
|
|
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) or using the END button
|
16
|
Trial or full version expired
|
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
|
3010
|
Online Activation - The Serial Number was already used on another PC
|
16382
|
If CheckSysdateChanges is set to true and Licence Protector 5 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 5
|
Sample
|
iRes := lic.PrepareAndCheckNT(sMyLicfile, ‘XTIORHjmV65XFlH/pRYBjxlRJnhCL....’, ‘D1001’, ‘’, true, false);
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
|