Sky Software Homepage LogicNP Software Knowledge Base And FAQ

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

HOWTO: Set license features when generating new licenses using the Generator API

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



Joined: 18 Jul 2005
Posts: 731

Posted: Sat Feb 19, 2011 6:01 am    Post subject: HOWTO: Set license features when generating new licenses using the Generator API

Use the following code to set license features when generating new licenses using the Generator API:

[C#]
Code:
CryptoLicenseGenerator gen = new CryptoLicenseGenerator(@"c:\MyApp.netlicproj"); // Load license project

BitArray ba = new BitArray(3); // 3-bit array
ba[0]=true; // Feature 1 present
ba[1]=false;// Feature 2 not present
ba[2]=true;// Feature 3 present

gen.SetFeaturesEx(ba);

gen.Generate(); // The generated license will have the above specified features


[VB.Net]
Code:
Dim gen As CryptoLicenseGenerator = New CryptoLicenseGenerator("c:\MyApp.netlicproj") ' Load license project

Dim ba As BitArray = New BitArray(3) ' 3-bit array
ba(0) = True ' Feature 1 present
ba(1) = False ' Feature 2 not present
ba(2) = True ' Feature 3 present

gen.SetFeaturesEx(ba)

gen.Generate() ' The generated license will have the above specified features Each license can have upto 2040 bits/features.
Back to top
Display posts from previous:   
Forum Index -> CryptoLicensing For .Net All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group