Standard protection interface is intended for obtaining license data such as license status, demo mode status, current state of demo mode limitations and so on.

Protection interface data can be accessed in the following ways:

1) By calling GetInterfaceData() protection interface function.

This can be done by using standard advanced protection interface 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 querying appropriate environment variables

This is probably the easiest way which can be accomplished from almost any kind of application. You need to enable "Set environment variables" option in protection interface options in this case.

Sample Visual Studio C/C++ console application (pi_env_sample) which demonstrates usage of protection interface environment variables is included in full featured version.

Please see the table below for the list of all available license data which can be obtained from protected applications.

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)
Remote protection information
PCGI_SiteCode ulong int Current Site code value
PCGI_MachineID word[4] Current Machine ID value
PCGI_NextSiteCode ulong int Next Site code value
PCGI_NextMachineID word[4] Next Machine ID value
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)
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)

NOTES:

- Custom features environment values are named as: PCGI_Features01, PCGI_Features02, ... PCGI_Features16 and appropriate custom counters are named as: PCGI_Counter01, PCGI_Counter02 ... PCGI_Counter10.

- Serial number features are not available as environment variables.

- PCGI_MachineID and PCGI_NextMachineID environment variables are hex strings with the following format: xxxx-xxxx-xxxx-xxxx

- In case of REMOTE protection method PCGI_ApplicationStatus is set to (0) before activation and during evaluation period (if demo mode is enabled). Once application is activated with valid activation code this value is set to (1). In case of other protection methods this value is always set to (1).

- In case of REMOTE protection method PCGI_DemoModeActive is set to (1) during evaluation period and to (0) after activation. In case of other protection methods this value is set to (1) during evaluation period and to (0) once evaluation period expires.