How to support floating and node locked licences in the same app
Last updated
Last updated
This article applies to QLM v14 and higher.
All the code described below can be found in the sample located in this folder: %Public%\Documents\Quick License Manager\Samples\qlmenterprise\DotNet\C#\QlmFloatingAndNodeLockedSample
The instructions below reference some parts of the code in order to explain the overall process. Please refer to the sample above to add a similar functionality to your own application.
This article will use an XML floating license file but the instructions provided here can be applied to an MS-Access floating license database or a SQL Server floating license database.
In QLM v14, the QLM License Wizard supports new settings that allow your customers to select whether to activate a floating license or a node locked license. In order to enable this functionality, you must set the following properties in the QLM Protect Your Application wizard:
In order to protect your .NET application with QLM, you must:
Add a reference to QlmLicenseLib.dll.
From the Protect Your Application wizard, generate a LicenseValidator class and add it to your project.
From the Protect Your Application wizard, generate the product settings file and add it to your project.
At application startup, you need to determine the type of license that needs to be managed in order to process a node-locked license or a floating license. The code below performs this determination.
If the license is a floating license, the code above calls ProcessFloatingLicense which takes care of initializing and connecting to the floating license database. The implementation of LaunchWizard referenced below can be found in the provided sample.
f the license is a node locked license, the code above calls ProcessNodeLockedLicense which takes care of activating the node locked license if it needs activation. The implementation of LaunchWizard referenced below can be found in the provided sample.
The first time your user launches your application, the LicenseKind will be undetermined and the QLM License Wizard will be displayed.
The Welcome page of the License Wizard contains a checkbox labeled, by default, "Floating License".
If the user checks this checkbox, the wizard will display the pages required to activate a floating license.
If the user unchecks this checkbox, the wizard will display the pages required to activate a node-locked license.
For floating licenses, once a license is activated and the floating license database is initialized on one system, all other nodes just need to connect to the floating license database without the need to activate a license.
Property
Value
QlmFloatingLicenseCheckBoxDefaultState
True or False. Select whether to default to a floating license or a node locked license.
QlmFloatingLicenseCheckBoxVisible
True
QlmShowFloatingLicensePage
True