Licence Protector

Prepare

Hide Navigation Pane

Prepare

Previous topic Next topic  

Prepare

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

 

Name

Prepare                                                                                              

Purpose

Prepares the Licence Protector instance for usage and opens the license file

Params

Parameter

Type

Example

Note

license file

String

F:\mylic.lic

The full path to the license file. See details for UNC pathnames

ProjectSecureKey or ReadKey

String

I am a project secure key

Security Level BASIC:

The project secure key for that license file. Can contain any characters. The minimum length is 6 characters, the recommended length is 15 and greater

Security Level ADVANCED:

The Read Key for that license file. It can not be chosen freely but has to be created using the Create Project Keys function in License Generator.

Returncode

Returncode

Type Integer

Note

0

The license file was successfully opened

2

The license file could not be found or was not opened

16382

If CheckSysdateChanges is set to true and Licence Protector recognizes that the date was manipulated then you get this error code.

16384 or 2048

The file to open is not a valid license file or it has another security level: You can not open a license file of security level ADVANCED using its PSK. You need its Read Key.

Other return codes

Prepare failed, see list of return codes

Usage

Important function in order to use Licence Protector. Dependant of property SecurityLevel Prepare acts as PrepareSimple for Security Level BASIC (=0, default) or PrepareAdvanced for Security Level ADVANCED (=1).

Sample

 

  lic.SecurityLevel := 0; // the following Prepare acts as PrepareSimple and needs a PSK

                          // at 1, Prepare would act as PrepareAdvanced and needs a                      ReadKey

  iRes := lic.Prepare(sMyLicfile, ‘I am a project secure key’);

  if iRes <> 0 then

  begin

    << an error occurred >>

     ...

  end

  else

  begin

    << everything is fine, continue >>

     ...

See also

PrepareAdvanced, PrepareSimple, SysdateChanged, CheckSysdateChanged, Validate, Quit, PrepareForce

 

You have to set the SecurityLevel before you can use this command