View previous topic :: View next topic |
Author |
Message |
manlyboy
Joined: 24 Apr 2012 Posts: 30
|
Posted: Tue Jun 12, 2018 1:03 am Post subject: How to license a dll used by developers |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Jun 12, 2018 7:42 am Post subject: |
|
|
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 |
|
|
manlyboy
Joined: 24 Apr 2012 Posts: 30
|
Posted: Wed Jun 13, 2018 11:15 pm Post subject: |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Jun 14, 2018 12:16 pm Post subject: |
|
|
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 |
|
|
|