How-to: Use Named Features

DeployLX supports named features in two ways - up to 8 serial number flags, or in up to 27 flags per Feature limit.

Fore more complex state consider storing custom data.

Using the Feature Limit

Adding a Feature Limit to a license adds an additional 27 named features. Features can be enabled with a serial number, or later with an extension code.

To add a Feature Limit
  1. Open a license in the Advanced License Editor.
  2. Select an edition from the list.
  3. Select the Feature Limit from the Limits Gallery in the License tab of the Ribbon.
  4. Give a name to each of the features.
To enable a feature when generating a serial number
  1. Open the license file in the Advanced License Editor.
  2. Select the license edition contianing the Feature limit.
  3. Select Generate Code | Generate Serial Number from the License Tab.
  4. Select the Feature limit in one of the Initialize... groups.
  5. Select Pick Features.
  6. Select the features to enable and select OK to close the form.
  7. Select Generate to create the serial numbers.
To enable a feature with an extension code
  1. Open the license file in the Advanced License Editor.
  2. Select the license edition contianing the Feature limit.
  3. Select Generate Code | Generate Extension Code from the License Tab.
  4. Select the Feature limit in the Extension group.
  5. Select Pick Features.
  6. Select the features to enable and select OK to close the form.
  7. Select Generate to create the extension.

Checking For a Feature

Once you've configured the feature limit, you can check for the presence of that feature in code.

_license = SecureLicenseManager.Validate(Me, Nothing, Nothing)
If _license.AreFeaturesEnabled("PrintEnabled") Then
    _print.Enabled = True
End If
_license = SecureLicenseManager.Validate( this, null, null );
if( _license.AreFeaturesEnabled( "PrintEnabled" ) )
    _print.Enabled = true;

Using Serial Number Flags

Each license that is unlocked with a serial number may be initialized with up to 8 serial number flags. By default the flags are referenced by index, but they may also be given more meaningful names.

To configure flag names
  1. Open a license in the Advanced License Editor.
  2. Select an edition with Require a serial number to use the 'XXXX' edition selected.
  3. Select the Named Flags button.
  4. Give a name to each of the flags.

Checking For a Flag

Once you've configured the flag names, you can check for the presence of that flag in code.

_license = SecureLicenseManager.Validate(Me, Nothing, Nothing)
If _license.GetFlag("PrintEnabled") Then
    _print.Enabled = True
End If
_license = SecureLicenseManager.Validate( this, null, null );
if( _license.GetFlag( "PrintEnabled" ) )
    _print.Enabled = true;

Setting Flags

The serial number flags are set when the serial number for the license is generated.

To set a flag when generating a serial number
  1. Open a license in the Advanced License Editor.
  2. Select the edition to generate a serial number.
  3. Select Generate Code | Generate Serial Number.
  4. Check the flags to enable in the Embedded Data group.
  5. Select Generate.

To change the serial number flags after the software has already been registered, you must generate a new serial number specifying all of the flags to enable. You can then force a new registration by calling:

_license.ShowRegistrationForm(Me, Nothing, Nothing)
_license.ShowRegistrationForm( this, null, null );
Published : Sep 01, 2009
Updated : Sep 30, 2014
Views : 7875

Downloads