Description
Function will transfer active license to another computer. Current license is removed and valid activation code is generated based on passed NewSiteCode value.
Availability
Protection method: | REMOTE |
Application status: | Activated |
Required features: | License transfer feature |
Declaration
Visual C/C++ |
extern "C" __declspec(dllimport) int __stdcall TransferLicense(DWORD NewSiteCode, char* NewActivationCode); |
Visual Basic |
Declare Function TransferLicense Lib "pcgint.dll" Alias "_TransferLicense@8" (ByVal NewSiteCode As Long, ByVal NewActivationCode As String) As Long |
Delphi |
function TransferLicense(NewSiteCode: longint; NewActivationCode: PAnsiChar): longint; stdcall; external 'pcgint.dll' name '_TransferLicense@8'; |
Delphi 64bit |
function TransferLicense(NewSiteCode: longint; NewActivationCode: PAnsiChar): Int64; stdcall; external 'pcgint64.dll'; |
Parameters
NewSiteCode - new Site code value
NewActivationCode - pointer to new Activation code buffer
Return values
If the function succeeds, PCGI_STATUS_OK is returned, license is removed and NewActivationCode buffer is filled with valid activation code for new computer.
If the function fails, return value is on of the following error codes:
PCGI_ERROR_TRANSFER_IMPOSSIBLE
PCGI_ERROR_APPLICATION_IS_LOCKED
PCGI_CRITICAL_ERROR
Full list of return codes is available here.
Notes
NewActivationCode buffer must be at least 255 characters long.
Once NewActivationCode is processed as required (displayed to end user or saved to a file for example) protected application should exit or restart.
If application is not protected with REMOTE protection method function will return PCGI_ERROR_TRANSFER_IMPOSSIBLE error code.