Description

Function will remove existing license and return valid Removal code.

Availability

Protection method: REMOTE
Application status: Activated
Required features: License removal feature

Declaration

Visual C/C++
extern "C" __declspec(dllimport) int __stdcall RemoveLicense(LPDWORD RemovalCode);
Visual Basic
Declare Function RemoveLicense Lib "pcgint.dll" Alias "_RemoveLicense@4" (ByRef RemovalCode As Long) As Long
Delphi
function RemoveLicense(var RemovalCode: longint): longint; stdcall; external 'pcgint.dll' name '_RemoveLicense@4';
Delphi 64bit
function RemoveLicense(var RemovalCode: longint): Int64; stdcall; external 'pcgint64.dll';

Parameters

RemovalCode - pointer to Removal code

Return values

If the function succeeds, PCGI_STATUS_OK is returned, license is removed and RemovalCode buffer is filled with valid Removal code.

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

PCGI_ERROR_LICENSE_CANT_BE_REMOVED
PCGI_ERROR_APPLICATION_IS_LOCKED
PCGI_CRITICAL_ERROR

Full list of return codes is available here.

Notes

In case ACEN web licensing is enabled for protected application both activation center and local license will be removed. 
Protected application should exit or restart once license is successfully removed.
If application is not protected with REMOTE protection method function will return PCGI_ERROR_LICENSE_CANT_BE_REMOVED error code.