Standard protection interface is intended for obtaining important license data such as protection method used, license status (activated/not activated), demo mode status, limited license status and other license data.
Protection interface data can be accessed in the following ways:
1 By calling GetInterfaceData() advanced protection interface function.
This can be done from almost any programming language such as C/C++, VB or Delphi. Standard advanced protection interface is available for both 32 bit and 64 bit Windows applications.
.NET applications can use alternate protection interface implementation for calling GetInterfaceData() function.
2 By enabling "Set environment variables" option in protection interface options and by querying appropriate environment variables.
This is probably the easiest way which can be accomplished from almost any kind of application.
Sample Visual Studio C/C++ console application (pi_env_sample) which demonstrates usage of protection interface environment variables is included in full featured version.
Here is the list of available information which can be obtained from protection interface:
Name | Type | Description |
---|---|---|
PCGI_ApplicationName | string | Application name as set in application info settings. |
PCGI_ProtectionMethod | ulong int | Protection method (0 - REMOTE, 1 - NETWORK, 2 - PLAIN, 3 - USB) |
PCGI_ApplicationStatus | long int | Application status value (0 - locked, 1 - activated) |
PCGI_ProtectionTime | FILETIME | Time of protection in FILETIME format (UTC) |
Remote protection information | ||
PCGI_SiteCode | ulong int | Current Site code value (xxxxxxxx) |
PCGI_MachineID | word[4] | Current Machine ID value (xxxx-xxxx-xxxx-xxxx) |
PCGI_NextSiteCode | ulong int | Next Site code value (xxxxxxxx) |
PCGI_NextMachineID | word[4] | Next Machine ID value (xxxx-xxxx-xxxx-xxxx) |
PCGI_ActivationCode | string | Activation code |
Updates policy information | ||
PCGI_UpdateID | ulong int | Latest valid Update ID value |
PCGI_FailedUpdateID | ulong int | Latest failed Update ID value when PCGI_UpdatesPolicyError = 1 |
PCGI_UpdatesPolicyError | ulong int | 0 - update allowed, 1 - update not allowed (based on updates policy) |
PCGI_UpdatesPolicyDays | ulong int | Updates validity period (in days from activation) (0 - no policy) |
PCGI_UpdatesPolicyStart | string | Updates policy: fixed period: start date in DDMMYYYY format |
PCGI_UpdatesPolicyEnd | string | Updates policy: fixed period: end date in DDMMYYYY format |
PCGI_UpdatesPolicyRangeStart | ulong int | Updates policy allowed update id range start (0 - no limit) |
PCGI_UpdatesPolicyRangeEnd | ulong int | Updates policy allowed update id range end (0 - no limit) |
PCGI_UpdatesPolicyRangeFromStart | ulong int | Updates policy: allowed "upgrade from" update id range start (0 - no limit) |
PCGI_UpdatesPolicyRangeFromEnd | ulong int | Updates policy: allowed "upgrade from" update id range end (0 - no limit) |
Serial numbers | ||
PCGI_SerialNumbersEnabled | ulong int | Serial numbers feature status (0 - off, 1 - on) |
PCGI_SerialNumberSet | ulong int | Valid serial number set? (0 - no, 1 - yes) |
PCGI_SerialNumber | string | Serial number string (XXXX-XXXX-XX-XXXX-XXXX) |
PCGI_SerialNumberFeatures | byte array | Serial number features 1-16 (0 - feature disabled, 1 - feature enabled) |
Custom data information | ||
PCGI_Features | byte array | Custom features 1-16 (0 - feature disabled, 1 - feature enabled) |
PCGI_Counters | long array | Custom counters 1-10 |
User information | ||
PCGI_UserName | string | User name |
PCGI_UserAddress | string | User address |
PCGI_UserCompany | string | User company |
PCGI_UserCustomInfo1 | string | User custom info 1 |
PCGI_UserCustomInfo2 | string | User custom info 2 |
PCGI_UserCustomInfo3 | string | User custom info 3 |
Demo mode information | ||
PCGI_DemoModeActive | ulong int | Demo mode status. (0 - demo mode off, 1 - demo mode on) |
PCGI_DemoDaysLeft | ulong int | Demo mode: number of days left. (-1 means date limitation is not enabled) |
PCGI_DemoUsesLeft | ulong int | Demo mode: number of uses left. (-1 means exec limitation is not enabled) |
PCGI_DemoFixedStartDate | string | Demo mode: Fixed date limitation: start date in DDMMYYYY format |
PCGI_DemoFixedExpDate | string | Demo mode: Fixed date limitation: end date in DDMMYYYY format |
PCGI_DemoTimer | ulong int | Demo mode: Cumulative timer: number of minutes of usage since first run |
PCGI_DemoTimerLimit | ulong int | Demo mode: Cumulative timer: total allowed time of usage |
License information | ||
PCGI_LicenseTransfers | ulong int | Number of license transfers made since first activation (REMOTE) |
PCGI_LimitedLicenseActive | ulong int | Limited license status. (0 - off, 1 - on) |
PCGI_LimitedLicenseDaysLeft | ulong int | Limited license: number of days left. (-1 means date limitation is disabled) |
PCGI_LimitedLicenseUsesLeft | ulong int | Limited license: number of uses left. (-1 means exec limitation is disabled) |
PCGI_LimLicFixedStartDate | string | Limited license: Fixed date limitation: start date in DDMMYYYY format |
PCGI_LimLicFixedExpDate | string | Limited license: Fixed date limitation: expiration date in DDMMYYYY format |
PCGI_LimLicDayOfMonth | ulong int | Limited license, day of the month value (1 - 31, 0 means limitation is off) |
PCGI_ActivationTime | FILETIME | Time of license activation on remote computer in FILETIME format (UTC). |
PCGI_LicenseExtensionTime | FILETIME | Time of last recorded license extension on remote computer in FILETIME format (UTC). |
ACEN Licensing | ||
PCGI_ACEN_WebLicensing | byte | ACEN licensing enabled flag (0 - OFF, 1 - ON). |
PCGI_ACEN_Status | ulong int | Last status code received from ACEN server. |
PCGI_ACEN_WebLicenseID | ulong int | ACEN Web License ID value. (WEB licensing model) |
PCGI_ACEN_LicenseID | ulong int | ACEN License ID value (Standard licensing model) |
PCGI_ACEN_OrderID | ulong int | ACEN Order ID value. |
PCGI_ACEN_ProductID | ulong int | ACEN Product ID value as set in project settings. |
PCGI_ACEN_ClientID | string | ACEN Client ID value |
Network protection information | ||
PCGI_MaxNetworkSeats | ulong int | Max number of workstations allowed to access protected application (0 - not set) |
PCGI_NetCfgFileLoaded | ulong int | Network configuration file loaded (0 - no, 1 - yes) |
PCGI_NetCfgStartDate | string | Network configuration file start date in DDMMYYYY format |
PCGI_NetCfgExpDate | string | Network configuration file expiration date in DDMMYYYY format |
Misc information | ||
PCGI_MaxAppInstances | ulong int | Max number of application instances (0 - not set) |
PCGI_VirtualMachineFlag | ulong int | Virtual machine flag (0 - VM not detected, 1 - VM detected) |