Licence Protector

Prepare and Check

Hide Navigation Pane

Prepare and Check

Previous topic Next topic No directory for this topic  

Prepare and Check

Previous topic Next topic Topic directory requires JavaScript JavaScript is required for the print function Mail us feedback on this topic!  

 

This is the main command to invoke the EasyGo dialogs and perform the complete basic license testing:

 

open the license file with the EasyGo screens

check if it is a time limited trial version - in case the trial expired, displays the screen: Evaluation period expired

check if the system date was tampered with (only if CheckSysdateChangedwas used). In case of an error displays the screen: System date was tampered

check if the product is activated - otherwise offers to use one of the specified activation methods

check if copy protection is OK - in case of an error displays the screen: copy protection violation and try an automatic reactivation

check if network license is OK - in case of an error displays the screen: No free license available

check if a user / PC was deactivated -in in case of an error displays the screen: Network license -deactivated

 

See List of Return / Error Codes and Other Errors.

 

 

 

 

 

 

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 UNC pathnames

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

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

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) 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 common reasons for this error

2048

The file %filename% is not a valid license file or file cannot be opened
See common reasons for this error

3010

Online Activation - The Serial Number was already used on another PC

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 do a manual system date modification check with SysDateChanged, you have to call this command even if the status code of PrepareAndCheck is not 0. SysDateChanged generates an internal flag that the application was started today even when the start fails, e.g. because the license expired. The flag is set automatically if CheckSysDateChanged is used instead.

 

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

 

The command SetRegisterSerialNo would display this Serial Number as a default value in the activation dialogues

 

 

See also
Module ID
Read Key
Open multiple license files at the same time