Description
Function will activate locked application or extend DEMO mode (if "Extend evaluation period" special flag is enabled) based on passed activation code.
In case serial numbers are enabled, valid serial number should be set before using this function. If not, function will return PCGI_ERROR_INVALID_SERIAL_NUMBER error code.
Availability
Protection method: | REMOTE |
Application status: | Locked or in DEMO mode |
Required features: | None |
Declaration
Visual C/C++ |
extern "C" __declspec(dllimport) int __stdcall UnlockApplication(char * ActivationCode); |
Visual Basic |
Declare Function UnlockApplication Lib "pcgint.dll" Alias "_UnlockApplication@4" (ByVal ActivationCode As String) As Long |
Delphi |
function UnlockApplication(ActivationCode: PAnsiChar): longint; stdcall; external 'pcgint.dll' name '_UnlockApplication@4'; |
Delphi 64bit |
function UnlockApplication(ActivationCode: PAnsiChar): Int64; stdcall; external 'pcgint64.dll'; |
Parameters
ActivationCode - pointer to Activation code string
Return values
If the function succeeds, application is activated or evaluation is extended and 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_INVALID_ACTIVATION_CODE
PCGI_ERROR_ALREADY_UNLOCKED
PCGI_ERROR_DEMO_CANT_BE_EXTENDED
PCGI_ERROR_INVALID_SERIAL_NUMBER
PCGI_CRITICAL_ERROR
Full list of return codes is available here.