ILicenseManager.FeatureInfo

Syntax

FeatureInfo(FeatureName: String): ILicenseFeatureInfo;

Parameters

FeatureName. Feature name.

Description

The FeatureInfo method gets information on a feature.

Example

To execute the example, place the Button, Editbox and Memo components named Button1, Editbox1 and Memo1 on the form.

Add links to the Host, Ui, Forms, Collections system assemblies.

The example is a handler of the OnClick event for the Button1 component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    LicManager: ILicenseManager;
    Feature: String;
    FeatureInfo: ILicenseFeatureInfo;
    Info: IStringList;
Begin
    LicManager := WinApplication.Instance.LicenseManager;
    Feature := EditBox1.Text;
    FeatureInfo := LicManager.FeatureInfo(Feature);
    Memo1.Clear;
    Info := Memo1.Lines;
    
If FeatureInfo <> Null Then
        Info.Add(
"Feature name: " + FeatureInfo.FeatureName);
        Info.Add(
"License description: " + FeatureInfo.Description);
        Info.Add(
"Ability to check out local license: " + FeatureInfo.CommuterAllowed.ToString);
        Info.Add(
"Effective from: " + FeatureInfo.StartDate.ToString);
        Info.Add(
"Effective to: " + FeatureInfo.ExpireDate.ToString);
        Info.Add(
"License type (0-Standalone/1-NetWork): " + FeatureInfo.LicenseMode.ToString);
        Info.Add(
"Demo or permanent (0)/trial (1): " + FeatureInfo.LicenseType.ToString);
        Info.Add(
"Locking type (0-Unlocked;1-ClientLocked;2-ServerLocked): " + FeatureInfo.LockType.ToString);
        Info.Add(
"Trial period length: " + FeatureInfo.TrialDaysCount.ToString);
        Info.Add(
"Restricted(False)/Unrestricted(True) license: " + FeatureInfo.NoExpiration.ToString);
        Info.Add(
"Number of days when license expires: " + FeatureInfo.DaysLeft.ToString);
        Info.Add(
"License server name: " + LicManager.Server);
        Info.Add(
"License number: " + FeatureInfo.LicenseIds.AsString);
    
Else
        Info.Add(
"Information about license = Null");
    
End If;
End Sub Button1OnClick;

Enter name of the preinstalled feature into Editbox, for example, PP_OLAP, and click the button. Information about the specified feature will be displayed in Memo1.

See also:

ILicenseManager