For Windows applications, the QLM Protect Your Application wizard (3rd tab) in the QLM Management Console) can generate a class called LicenseValidator in several programming languages.
The generated LicenseValidator class provides several benefits over working directly with a QlmLicense object:
- When the LicenseValidator class is generated, a default class constructor is created which properly initializes all the QlmLicense object properties that are specific to your product and your License Server.
- The LicenseValidator class provides a constructor that takes as input the xml settings file generated by the Protect Your Application wizard. Initializing the LicenseValidator class with the xml settings file is highly recommended because:
- It provides consistency of information when using the QLM License Wizard. When using hard coded settings in your code, you need to always ensure that these settings are consistent with the settings provided to the QLM License Wizard.
- It allows you to use the same LicenseValidator class across several products or product versions.
- It allows you to make changes to your settings without having to rebuild your application.
As a general rule, we highly recommend using the LicenseValidator class rather than directly instantiating the QlmLicense object from within your application. When needed, the LicenseValidator class provides direct access to the underlying QlmLicense object via an accessor property.
Comments
0 comments
Please sign in to leave a comment.