Description

Function will validate and set serial number for protected application.

Availability

Protection method: REMOTE, PLAIN, USB
Application status: All
Required features: Serial numbers feature

Declaration

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

Parameters

SerialNumber - pointer to serial number string

Return values

If the function succeeds, PCGI_STATUS_OK is returned and new serial number is set for protected application.

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

PCGI_ERROR_SERIAL_NUMBERS_DISABLED
PCGI_ERROR_INVALID_SERIAL_NUMBER
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.