Protection interface is the interface between your protected application and PC Guard's protection code which is embedded into application during protection process.

In this way, license status and many other valuable information may be obtained. Application can even interact with protection code by calling protection interface functions.

Our protection code will gain control on startup, check license status, demo limitations, application integrity, initialize required data (import functions, relocation tables), decrypt application and pass control to it.

By default, (unless run-time encryption is used) protection code will not affect application execution once the control is passed to it. However, there is often a need for checking different license data such as activation status, demo mode status, value of custom counters or status of custom features  for example.

There are two levels of protection interface implementation: Standard and Advanced.
 

STANDARD PROTECTION INTERFACE

The following information can be accessed via protection interface:

- Application name
- User information (name, address, company, custom user information)

- Protection method (remote, network, plain, code)

- Site code
- Machine ID (MID) code
- Next Site code
- Next Machine ID code
- Application status (locked/unlocked)
- Activation code (for already activated application)

- Update ID
- Updates policy: validity period (number of days from activation)
- Updates policy: fixed validity period (start date - end date)

- Serial numbers feature flag (0 - off, 1 - on)
- Serial number set flag (0 - no, 1 - yes)
- Serial number string (XXXX-XXXX-XX-XXXX-XXXX)
- Serial number features

- Custom features (16 features passed via activation code)
- Custom counters (10 counters)

- Demo mode status (on/off)
- Demo mode: number of days left
- Demo mode: number of uses left
- Demo mode: fixed date limitation (start - end)
- Demo mode: cumulative timer counter
- Demo mode: cumulate timer limit

- Limited license status (on/off)
- Limited license: number of days left
- Limited license: number of uses left
- Limited license: fixed date limitation (start - end)

- Number of license transfers made from first activation

- Maximum number of application instances (if available)

- Maximum number of network seats (network protection method)
- Network configuration file status (loaded/not loaded)
- Network configuration file start date
- Network configuration file expiration date
ADVANCED PROTECTION INTERFACE
Interact with embedded protection code via interface functions:

GetInterfaceData()
Function will retrieve information about current license.

UpdateCustomCounters()
Function will update (save) custom counters.

UnlockApplication()
Function will process Activation code and unlock application or extend evaluation period depending on Activation code and custom features passed via it.

LoadActivationFile()
Function will load and process activation file and thus activate application or extend evaluation period (if extend evaluation period feature was enabled in activation code).

RemoveLicense()
Function will remove current license and return valid Removal code.

TransferLicense()
Function will transfer active license to another computer. Current license is removed and valid activation code is calculated based on passed Site code value.

ExtendLicense()
Easily update issued license before it expires. Update features, counters, limitations...

CheckDemoLimitations()
Function will check demo (date and fixed date) limitations.

CheckLimitedLicense()
Function will check limited license expiration status.

FreeAppInstance()
Function will free application instance from the list of currently active application instances (see network protection method notes for more information).

CountActiveInstances()
Function will return number of currently active instances.

CountActiveNetworkSeats()
Function will return number of currently active network seats.

SetLicenseValidityPeriod()
Function will set new license validity period.

SetSerialNumber()
Function will validate and set serial number for protected application.

InvalidateSerialNumber()
Function will invalidate existing serial number and reset license.

CheckForUsbDrive()
Function will check if required USB drive is attached to computer.