Within your Source Code you use the EasyGo commands and some additional checks.
• | Open your license file by starting EasyGo with PrepareAndCheck |
• | Check if the version is already activated because only then you need to perform the additional online check - GetWebActivation using the main module ID would return 2 = application is activated |
• | By default, the online check is transparent for the customer by displaying the following 3 screens. |
The dialogs could be deactivated either with the settings <ShowWAStartPage>, <ShowWAProgressPage>, <ShowWAResultpage> in the project template or with the commands ShowWAStartPage, ShowWAProgressPage, ShowWAResultPage in the source code.
If the product is already activated,
• | Retrieve the Serial Number using GetSerial |
• | Enable the regular online check of this module with SetVerificationOfModule = 1. This is only necessary if the online check was not enabled within the project template. Note: |
• | The current status can be retrieved using GetVerificationOfModule. The result frozen = 2 indicates that the license was locked . Implement a reactivation screen like this: License deactivated / reactivate license. |
• | Perform the online check with CheckModuleSubscription (with grace period) or CheckModule (no grace period) specifying the main module number and using the Serial Number as ID, download full license should be set to false (no download of license file). |
Licence Protector will go online only if the next check is due. Otherwise Licence Protector will just continue without going online. Note: GetNextVerificationOfModule will retrieve the date, when the next online check is due.
The check is documented on the Activation Server 4 with transaction type Validation.
• | The next date to go online is retrieved from the product configuration - value from field Regular license checks (days). The new date for the next online verification is stored in the license file. It can be changed using NextVerificationOfModule |
Program logic depending on the results of CheckModuleSubscription
• | Only continue in your application if error code is 0 |
• | If error code is 3018 then the license is locked on the Activation Server 4 (see how to lock the license). Your application should terminate. The next start of the application will always go online to check if the license is still locked |
• | If error code is 3001 then no online connection could be established. This error will appear only if no grace period is left (see below |
In case the connection to the Activation Server 4 fails, a grace period is activated (if value of grace period >0) . Details see CheckModuleSubscription
• | Use SetSubGraceDays to overwrite the default value of the template <SubGraceDays> |
• | Use GetVal, Token SGD to retrieve the number of grace time in full days (integer value) - set with SetSubGraceDays |
• | Use GetRemainingSubgraceDays to retrieve the remaining grace time as an exact double value (e.g. 2.8765 days) |
• | Use GetVal, Token SGP to retrieve the expiry date/time of the grace period (date/time value) |
Set the grace period to 10000 days in case you have installations which have never an online connection. This allows activating the regular license check as a general setup and the application would work with or without an online connection.
• | It is normally sufficient to use the main module for the online check although the online check can be activated per module |
• | By default, the first date for the regular online check is used from the configuration file on the Activation Server 4, product configuration - Regular license check (days) |
• | A date for the first/next online validation could be set with NextVerificationOfModule. It also allows to retrieve the date for the next regular online check |
• | Get or Set the date, when the last online check is planned with EndVerificationOfModule. After this date, all checks are terminated |
• | The current status can be retrieved using GetVerificationOfModule |
• | Set the grace period with SetSubGraceDays |
• | The regular license check can be changed or terminated for a single key within the Key Details on the Activation Server 4 |