Sky Software Homepage LogicNP Software Knowledge Base And FAQ

 
Contact Product Support    SearchSearch      Subscribe to the RSS feed for this forum

INFO: Licensing Plugins & Addins

 
Subscribe to the RSS feed for this forum  Forum Index -> CryptoLicensing For ActiveX
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

Posted: Fri Jun 26, 2009 10:09 am    Post subject: INFO: Licensing Plugins & Addins

The general scheme for licensing of plugins or addins is as follows:

In the constructor/initialization routine of your plugin/addin, use a trial license code generated using CryptoLicensing Generator - this trial code can specify any constraints you wish such as 'Max usage days', 'Max executions', 'Max unique usage days' etc. Further you can also limit the functionality of your plugin if its an evaluation license.

When the user enters a full license, you will pass it on to CryptoLicensing using the CryptoLicense.LicenseCode property and then save it using CryptoLicense.Save so that it will be used the next time your plugin is loaded.

Thus, if a full license is loaded (saved above), it will be get validated, otherwise the trial license will get validated by default.

Code:
CryptoLicense1.ValidationKey = "<<validation key for your project>>"
CryptoLicense1.StorageMode = LicenseStorageMode.LS_Registry

' Load license from registry
If (CryptoLicense1.Load = False) Then
' license not found in registry which means that the user has not yet entered a full license
' Use a trial license
CryptoLicense1.LicenseCode = "<<trial license code>>"

End If

' check that the full license is valid or that the eval license is valid and not expired
If CryptoLicense1.Status <> LS_Valid Then
MsgBox "license not valid/evalution expired"
End If

' license is valid

' we can check if its trial license and reduce functionality if so desired
If CryptoLicense1.IsEvaluationLicense Then
' reduce functionality is so desired
End If



...
...
...
...

' user enters a full license

CryptoLicense1.LicenseCode = "<<license code entered by user>>"
If CryptoLicense1.Status <> LS_Valid Then
MsgBox "invalid license entered"
Else
' save license so that it will get loaded next time the plugin starts
CryptoLicense1.Save
End If
Back to top
Display posts from previous:   
Forum Index -> CryptoLicensing For ActiveX All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group