Source Code Integration

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

 

Within your Source Code you use the EasyGo commands and some additional checks.

 

Use SetLanguage, SecurityLevel, SetRegisterSettings
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.

 

Start Screen (ShowWAStartPage)
Progess Screen (ShowWAProgressPage)
Result Screen (ShowWAResultPage)

 

 

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 GetVal(<Main module>, “KYS”). You will get a list of all keys but only use the first key. This is the Serial Number
Perform the online check with CheckLicence (without specifying a module number but using the Serial Number as ID)

 

Licence Protector will go online only if the next check is due. Otherwise Licence Protector will just continue without going online.

 

The check is documented on the Activation Server with request type check license.

 

The next date to go online is retrieved from the configuration file project.config with the parameter <CheckLicenceDays> - see Configuration Settings. The new date for the next online verification is stored in the license file
Only continue in your application if error code is 0
If error code is 3018 then the license is locked on the Activation Server (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

 

If Online connection is not available and the user should have a few additional days to work, implement the following logic

 

If error code is 3001 (no internet connection) then

 

Check, if there is a date stored in the data area of the license file, to detect, if there was already an unsuccessful attempt with error 3001 - GetConfig OnlineCheckFailedDate . If the return value is empty, then no date was stored = first time the connection failed

 

Return value empty

 

Save today's date using SetConfig OnlineCheckFailedDate and as parameter today's date. The Parameter Isvisible should be set to false
Display a message, that the user has to go online within the next x days
Continue with your application

 

Return value is not empty

 

Calculate the date difference between the stored date and today's date
If the date difference is more than x days, then display a message that the application can only continue when an Internet connection is available. Otherwise display a message, that the user has to go online within the next x days

 

If error code is 0 (everything is OK) then

 

always delete the date in the license file using DeleteConig OnlineCheckFailedDate

 

If you don't have the Professional Edition of Licence Protector, you could use the TAG value field to store the date information - SetVal, Token TAG.

 

The CheckLicence command triggers the activation workflow file on the server, e.g. activates copy protection and sends out the keys defined in this file. If you send out a key which calculates a date (e.g. because you have a time limited full version), then you should make a new configuration file for the regular online check by using a different project name in the CheckLicence call.

Page url: http://www.helpserver.biz/onlinehelp/lp/easygo/2.7/help2000/index.html?block_licence_source_code_integration.htm