Description

This function will load and process activation file.

Instead of sending activation code and serial number to end user separately this information can be embedded into single activation file which would be then distributed to end user. Even more, activation file can hold additional information like user information and updates policy.

In this way, activation file can be used for:

1. DEMO mode extension ("Extend evaluation period" special flag should be enabled when generating activation code)

2. Activation of locked application

3. License extension of valid license

4. Extension of previously expired limited license ("License extension" special flag should be set when generating activation code)

Availability

Protection method: REMOTE
Application status: Demo mode, Activated or Expired limited license
Required features: Activation file feature

Declaration

Visual C/C++
extern "C" __declspec(dllimport) int __stdcall LoadActivationFile(char * ActivationFile);
Visual Basic
Declare Function LoadActivationFile Lib "pcgint.dll" Alias "_LoadActivationFile@4" (ByVal ActivationFile As String) As Long
Delphi
function LoadActivationFile(ActivationFile: PAnsiChar): longint; stdcall; external 'pcgint.dll' name '_LoadActivationFile@4';
Delphi 64bit
function LoadActivationFile(ActivationFile: PAnsiChar): Int64; stdcall; external 'pcgint64.dll';

Parameters

ActivationFile - full path to activation file. If null pointer is passed or in case it points to empty string default activation file (as set in project settings will be loaded and processed).

Return values

If the function succeeds, one of the following codes is returned:

PCGI_SUCCESS_APPLICATION_UNLOCKED
PCGI_SUCCESS_DEMO_EXTENDED

If the function fails, return value is on of the following error codes:

PCGI_ERROR_ACTIVATION_FILE_DISABLED
PCGI_ERROR_ACTIVATION_FILE_ERROR
PCGI_ERROR_INVALID_ACTIVATION_CODE
PCGI_ERROR_INVALID_SERIAL_NUMBER
PCGI_ERROR_DEMO_CANT_BE_EXTENDED
PCGI_CRITICAL_ERROR

Full list of return codes is available here.

Notes

Be sure to call GetIntefaceData function after calling this function in order to obtain current license status.
If application is not protected with REMOTE protection method function will return PCGI_ERROR_ACTIVATION_FILE_DISABLED error code.