Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to license a dll used by developers

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
manlyboy



Joined: 24 Apr 2012
Posts: 25

PostPosted: Tue Jun 12, 2018 1:03 am    Post subject: How to license a dll used by developers Reply with quote

Is there a method available to license the use of a dll for use by a third party developer and have the dll then distributed by that third party to the end user? The end-user would not be involved in the license checking scheme.

Thanks.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 4884

PostPosted: Tue Jun 12, 2018 7:42 am    Post subject: Reply with quote

Yes there are ways to accomplish that. The trick is to be able to differentiate between functionality required at design time and that required by the end user. If you can't do this then there is a risk that someone can simply use the license that your third party developers distribute to end users.

ILS provides support for licensing Windows Forms and WPF controls using the standard System.ComponentModel.LicenseManager class. When the system requests a license for a control it provides a LicenseContext which indicates whether the control is being used at DesignTime or runtime. When licensed controls are used at design time ILS automatically generates a runtime license key (from the design time license) which is then embedded by the compiler in the assembly resources. This runtime license cannot be used at design time - so even someone extracts the license key from assembly it does not enable them to use the license key to use the control within the designer.

If you are not building controls then you won't have this automatic mechanism for generating runtime licenses. You can use simple encrypted licensing for your dll and allow developers to distribute the license to their customers. Of course there is a risk that someone might simply "borrow" the distributed license key.

If you are able to separate some design time features from the runtime features (for instance if you have a design tool that generates parameters which your DLL then uses in some way) then you could use the same mechanism that the control licensing uses to generate separate runtime licenses (EncryptedLicenseProvider.GenerateRuntimeKey)
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
manlyboy



Joined: 24 Apr 2012
Posts: 25

PostPosted: Wed Jun 13, 2018 11:15 pm    Post subject: Reply with quote

Thanks for this reply. I had to read it a few times and still aren't 100% certain but:

I wish to write a dll that, when instantiated will need to take one parameter - a SecureString. That SecureString will then be used within the dll and can't be changed by the "end-user".

Does that qualify for usage by ILS?

If it does, is there any code or pesudo code that I can follow with setting this up.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 4884

PostPosted: Thu Jun 14, 2018 12:16 pm    Post subject: Reply with quote

One simple way to make this work is to have a licensed application that produces the SecureString (ideally using public key encryption) that your DLL then decrypts using the public key. So customers can't generate this (and hence use your DLL) unless they have the licensed application. This works well if each of your customers needs different information to be included in the SecureString (so they can't just use the SecureString that another application is passing your DLL).
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group