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:

NameTypeDescription
PCGI_ApplicationNamestringApplication name as set in application info settings.
PCGI_ProtectionMethodulong intProtection method (0 - REMOTE, 1 - NETWORK, 2 - PLAIN, 3 - USB)
PCGI_ApplicationStatuslong intApplication status value (0 - locked, 1 - activated)
PCGI_ProtectionTimeFILETIMETime of protection in FILETIME format (UTC)
Remote protection information
PCGI_SiteCodeulong intCurrent Site code value (xxxxxxxx)
PCGI_MachineIDword[4]Current Machine ID value (xxxx-xxxx-xxxx-xxxx)
PCGI_NextSiteCodeulong intNext Site code value (xxxxxxxx)
PCGI_NextMachineIDword[4]Next Machine ID value (xxxx-xxxx-xxxx-xxxx)
PCGI_ActivationCodestringActivation code
Updates policy information
PCGI_UpdateIDulong intLatest valid Update ID value
PCGI_FailedUpdateIDulong intLatest failed Update ID value when PCGI_UpdatesPolicyError = 1
PCGI_UpdatesPolicyErrorulong int0 - update allowed, 1 - update not allowed (based on updates policy)
PCGI_UpdatesPolicyDaysulong intUpdates validity period (in days from activation) (0 - no policy)
PCGI_UpdatesPolicyStartstringUpdates policy: fixed period: start date in DDMMYYYY format
PCGI_UpdatesPolicyEndstringUpdates policy: fixed period: end date in DDMMYYYY format
PCGI_UpdatesPolicyRangeStartulong intUpdates policy allowed update id range start (0 - no limit)
PCGI_UpdatesPolicyRangeEndulong intUpdates policy allowed update id range end (0 - no limit)
PCGI_UpdatesPolicyRangeFromStartulong intUpdates policy: allowed "upgrade from" update id range start (0 - no limit)
PCGI_UpdatesPolicyRangeFromEndulong intUpdates policy: allowed "upgrade from" update id range end (0 - no limit)
Serial numbers
PCGI_SerialNumbersEnabledulong intSerial numbers feature status (0 - off, 1 - on)
PCGI_SerialNumberSetulong intValid serial number set? (0 - no, 1 - yes)
PCGI_SerialNumberstringSerial number string (XXXX-XXXX-XX-XXXX-XXXX)
PCGI_SerialNumberFeaturesbyte arraySerial number features 1-16 (0 - feature disabled, 1 - feature enabled)
Custom data information
PCGI_Featuresbyte arrayCustom features 1-16 (0 - feature disabled, 1 - feature enabled)
PCGI_Counterslong arrayCustom counters 1-10
User information
PCGI_UserNamestringUser name
PCGI_UserAddressstringUser address
PCGI_UserCompanystringUser company
PCGI_UserCustomInfo1stringUser custom info 1
PCGI_UserCustomInfo2stringUser custom info 2
PCGI_UserCustomInfo3stringUser custom info 3
Demo mode information
PCGI_DemoModeActiveulong intDemo mode status. (0 - demo mode off, 1 - demo mode on)
PCGI_DemoDaysLeftulong intDemo mode: number of days left. (-1 means date limitation is not enabled)
PCGI_DemoUsesLeftulong intDemo mode: number of uses left. (-1 means exec limitation is not enabled)
PCGI_DemoFixedStartDatestringDemo mode: Fixed date limitation: start date in DDMMYYYY format
PCGI_DemoFixedExpDatestringDemo mode: Fixed date limitation: end date in DDMMYYYY format
PCGI_DemoTimerulong intDemo mode: Cumulative timer: number of minutes of usage since first run
PCGI_DemoTimerLimitulong intDemo mode: Cumulative timer: total allowed time of usage
License information
PCGI_LicenseTransfersulong intNumber of license transfers made since first activation (REMOTE)
PCGI_LimitedLicenseActiveulong intLimited license status. (0 - off, 1 - on)
PCGI_LimitedLicenseDaysLeftulong intLimited license: number of days left. (-1 means date limitation is disabled)
PCGI_LimitedLicenseUsesLeftulong intLimited license: number of uses left. (-1 means exec limitation is disabled)
PCGI_LimLicFixedStartDatestringLimited license: Fixed date limitation: start date in DDMMYYYY format
PCGI_LimLicFixedExpDatestringLimited license: Fixed date limitation: expiration date in DDMMYYYY format
PCGI_LimLicDayOfMonthulong intLimited license, day of the month value (1 - 31, 0 means limitation is off)
PCGI_ActivationTimeFILETIMETime of license activation on remote computer in FILETIME format (UTC).
PCGI_LicenseExtensionTimeFILETIMETime of last recorded license extension on remote computer in FILETIME format (UTC).
ACEN Licensing
PCGI_ACEN_WebLicensingbyteACEN licensing enabled flag (0 - OFF, 1 - ON).
PCGI_ACEN_Statusulong intLast status code received from ACEN server.
PCGI_ACEN_WebLicenseIDulong intACEN Web License ID value. (WEB licensing model)
PCGI_ACEN_LicenseIDulong intACEN License ID value (Standard licensing model)
PCGI_ACEN_OrderIDulong intACEN Order ID value.
PCGI_ACEN_ProductIDulong intACEN Product ID value as set in project settings.
PCGI_ACEN_ClientIDstringACEN Client ID value
Network protection information
PCGI_MaxNetworkSeatsulong intMax number of workstations allowed to access protected application (0 - not set)
PCGI_NetCfgFileLoadedulong intNetwork configuration file loaded (0 - no, 1 - yes)
PCGI_NetCfgStartDatestringNetwork configuration file start date in DDMMYYYY format
PCGI_NetCfgExpDatestringNetwork configuration file expiration date in DDMMYYYY format
Misc information
PCGI_MaxAppInstancesulong intMax number of application instances (0 - not set)
PCGI_VirtualMachineFlagulong intVirtual machine flag (0 - VM not detected, 1 - VM detected)

 

Custom features environment values are named as: PCGI_Feature01PCGI_Feature02, ... PCGI_Feature16 and appropriate custom counters are named as: PCGI_Counter01PCGI_Counter02 ... PCGI_Counter10.
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. PCGI_DemoModeActive is also 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.
PCGI_SerialNumberFeaturesPCGI_ProtectionTimePCGI_ActivationTime and PCGI_LicenseExtensionTime values are not available as environment variables.