Description

Function will run ACEN web licensing license validation task.

If application is currently activated, protection code will check if license in ACEN is still valid. If ACEN license is valid and not changed function will return PCGI_STATUS_OK. If license is valid but changed in ACEN, protection code will update local license with new changes and return PCGI_WEBLIC_LICENSE_UPDATED. If license is removed from ACEN, protection code will automatically remove local license. Additionally, if "If license is removed action" includes ban computer action, protection code will also ban remote computer. PCGI_WEBLIC_LICENSE_REMOVED and PCGI_WEBLIC_LICENSE_REMOVED_BANNED code are returned in this case, respectively.

If application is currently in locked state (not activated), protection code will automatically try to reactivate license. If this is not possible, PCGI_ERROR_APPLICATION_IS_LOCKED error code will be returned.
Function will validate web license regardless of 'License validation' option status in ACEN web licensing tasks settings. Function will also not affect timing counters for this option.

Availability

Protection method: REMOTE
Application status: All
Required features: ACEN web licensing

Declaration

Visual C/C++
extern "C" __declspec(dllimport) int __stdcall ValidateWebLicense();
Visual Basic
Declare Function ValidateWebLicense Lib "pcgint.dll" Alias "_ValidateWebLicense@0" () As Long
Delphi
function ValidateWebLicense():longint;stdcall; external 'pcgint.dll' name '_ValidateWebLicense@0';
Delphi 64bit
function ValidateWebLicense(): Int64; stdcall; external 'pcgint64.dll';

Parameters

None

Return values

In case protection code was able to validate web license, one of the following codes will be returned:

PCGI_STATUS_OK - Web license successfully validated, no changes in ACEN license detected.

PCGI_WEBLIC_LICENSE_UPDATED - License changed in ACEN, local license updated.

PCGI_WEBLIC_LICENSE_REMOVED - License removed in ACEN, local license removed.

PCGI_WEBLIC_LICENSE_REMOVED_BANNED - License removed in ACEN, local license removed and computer is banned.

In case of error, return value is one of the following error codes:

PCGI_ERROR_WEBLIC_DISABLED - ACEN web licensing is not enabled for this application.

PCGI_ERROR_SERIAL_NUMBERS_DISABLED - Serial numbers are not enabled.

PCGI_ERROR_SERIAL_NUMBER_NOT_SET - Serial number is not set.

PCGI_ERROR_APPLICATION_IS_LOCKED - application is locked, web license ID = 0, reactivation is not possible.

PCGI_ERROR_WEBLIC_FAILURE - unable to validate web license (Internet connection issue).

PCGI_ERROR_INVALID_ACTIVATION_CODE - ACEN web license changed in ACEN but obtained activation data is not valid.

PCGI_ERROR_WEBLIC_LICENSE_ERROR - ACEN returned error, use GetInterfaceData() to get (PCGI_ACEN_Status) actual error code.

PCGI_CRITICAL_ERROR

Full list of return codes is available here.