Navigation:  Function Reference >

PrepareForce

Previous pageReturn to chapter overviewNext page

 

Name

PrepareForce                                                                                       

Purpose

Prepares the Licence Protector instance for usage and opens the licence file. If a licence file cant be opened due to a wrong Installation Code (Copy Protection) this error will be ignored and the file will be opened

Params

Parameter

Type

Example

Note

Licence file

String

F:\mylic.lic

The full path to the licence 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 licence 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 licence file. It can not be chosen freely but has to be created using the Create Project Keys function in Licence Generator.

Returncode

Returncode

Type Integer

Note

0

The licence file was successfully opened

2

The licence 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 licence file or it has another security level: You can not open a licence file of security level ADVANCED using its PSK. You need its Read Key.

Other return codes

Prepare failed, see list of return codes

Usage

Normally Prepare should be used! PrepareForce can be used for administration tools that have to be able to open every known licence file. Dependant of property SecurityLevel PrepareForce can open licence files with Security Level BASIC (=0, default) or files with Security Level ADVANCED (=1).

Note: PrepareForce cant open licence files where the PSK is unknown. Only the Installation Code is ignored.

Sample

 

  lic.SecurityLevel := 0; // the following PrepareForce uses SecurityLevel BASIC and needs a PSK

                          // at 1, PrepareForce uses SecurityLevel ADVANCED and needs a                      ReadKey

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

  if iRes <> 0 then

  begin

     << an error occurred >>

     ...

  end

  else

  begin

     << everything is fine, continue >>

     ...

See also

Prepare, PrepareSimple, PrepareAdvanced, SysdateChanged, CheckSysdateChanged, Validate, Quit

 

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

 


Page url: http://www.helpserver.biz/onlinehelp/lp/easygo/2.5/help2000/index.html?fr_prepareforce.htm