To implement an workflow with a Serial Number you should implement the following code sequence.
Create generic license file
The generic license file, which is included in the installation package, has exactly the same settings like the file used with . See Create license File.
Ensure that you have set the property - Activation Status after product activation - in your project file.
Test main license
At the program start, implement the following code sequence
•SetLanguage - define language for all screens and error messages. Necessary even if you use own screens
•Open the license file with PrepareAdvanced - implement an own error handling. Error 1024 (copy protection violation) should allow to type in an Activation Key to switch copy protection type. Use SecurityLevel and PrepareForce to open the file and ShowLicViewer or an own user interface to provide the necessary information
•If you want to offer a license transfer, use CheckModuleSubscription
•Now test the main module with ValidateEX or ValidatesYes and check for time limitation with RemainingDays an/or ExpiredOn
•If the module is expired display a screen - Evaluation Period Expired. Make sure that you cover the situation if the version expires when the user already typed in a Serial Number and hasn't got the Unlock Key back
•If the status Activation is none (0) then the software does not need activation (no Serial Number was applied). Retrieve the activation status with GetWebActivation. Display a screen like this - Start Screen in Evaluation Mode
•If the status Activation is required (1) then a Serial Number was applied - display a screen to type in an Unlock Key - see Enter Unlock Key
•If the status Activation is done (2) then the software is activated - a screen should be displayed only in case of an error generated during PrepareAdvanced
•Provide an Own License Viewer
•To display errors, you could use ShowStartErrorPage, which would also cover to view the license and apply keys. You can retrieve a language specific error message with GetErrorMessage for your own dialogs. A good idea is to call PrepareAndCheck for each error as it includes screens AND error handling.
•Use Quit at the end of the application
You can make your own screens to type in a Serial Number and offer Online Activation, e-mail, Fax or Phone Activation. The Serial Number must have the same settings like used in EasyGo - see Serial Number Key. If you want to use the e-mail Activator Service then use GetMailActivatorBlock to build then encrypted text block for the e-mail.
•To save the Serial Number in the license file use SetVal (''module ID", 'SNR', your ID / Serial Number) •Use ApplyActivationKey (your ID / Serial Number) to read the values of the key and save it in the license file •Save the customer name in the license file using SetVal (''", 'CST', customer name)
You have to ensure, that the key is typed in in this format: aqGEC-5EPc3-9E7Ii-3tI8X-RQU5k-6v148 . IsKeyValid will check if it is a valid key for your license file. This command would not work if you use own IDs as a Serial Number.
|
The Online Activation process can be implemented with a few DLL calls. The configuration files are the same as used for EasyGo - see configure a project
The Serial number would be used as the unique ID on the Activation Server.
The sequence for the Online Activation is as follows:
•Retrieve the Serial Number using GetSerial •Activate the license for the main module using WebRegisterExt and use as the unique ID the Serial Number •Use SendCustomerInfo to send additional customer address information (e.g. phone number or language). The parameter ID / Serial Number must contain the Serial Number to link it with the customer address data •You can turn on/off the activation dialogs with ShowWAStartPage, ShowWAProgressPage, ShowWAResultPage •By defaults all other necessary parameters are retrieved from the license file but could also be set individually
Url to Activation Server - WebServiceURL
Project name - ProjectName
Proxy Settings - LocalProxyPort, LocalProxyServer, UseLocalIEProxy, UseLocalProxy |
You can test a module using ValidateEX (recommended), Validate or ValidatesYes. Additional options are:
•Retrieve the module type - GetVal, Token LTY. Module type is also retrievable with GetModuleList (list of all modules within a license file) •Retrieve module name - ModuleName. Module name is also also retrievable with GetModuleList •Check if a module exists in a license file - ExistsModule •Retrieve status Demo version of a module (ValidateEx) •Retrieve time limitation of a module RemainingDays and/or ExpiredOn •Retrieve the number of days which have been set for the trial period - NoOfDays •Retrieve Activation Status of a module - GetWebActivation (2 = product / product activation for a module is done) •Find out, if a module / license is deactivated using GetVerificationOfModule (result: frozen = 2) •You can add modules (AddModule) to the license file or remove modules (DeleteModule) . This is necessary if you e.g. install an update of the application with new features
For modules which are from type user, PC, concurrent, Item counter you can
•Retrieve number of licenses and available licenses of a network module - TotalLicences and RemainingLicences. If the module is from type counter then you get the value of the counter with TotalLicences •Retrieve all entries / user / computer - GetEntriesOfModule •Deactivate an entry / user / computer - DeactivateEntry •Activate an entry / user / computer again - ActivateEntry •Delete all entries / users / computers - RemoveAllItems •Delete all deactivated entries / user / computer - RemoveDeactivated •Check if a specified entry / user / computer exists - ExistsEntry •Check if an entry / user / computer is in use or deactivated - IsEntryActivated
|
Recommendations
You should provide a function to view the license information. Either provide the License Viewer or implement an own viewer.
See also
Create own License Viewer
Transfer a license from PC A to PC B
Block / Lock a license after Activation is done
Tamper Detection