ILicenseManager.CommuterInfo

Syntax

CommuterInfo(FeatureName: String): ILicenseCommuterInfo;

Parameters

FeatureName. Feature name.

Description

The GetCommuterInfo method gets information about a temporary local feature checked out from license server.

Comments

The method is relevant after a temporary local license is checked out from license server using the ILicenseManager.CheckoutCommuterLicense method. The ILicenseManager.IsCheckedOut method checks if a feature is checked out from license server.

If a feature is not checked out from license server, the method returns NULL.

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;
    CommuterInfo: ILicenseCommuterInfo;
    Info: IStringList;
Begin
    LicManager := WinApplication.Instance.LicenseManager;
    Feature := EditBox1.Text;
    Memo1.Clear;
    Info := Memo1.Lines;
    CommuterInfo := LicManager.CommuterInfo(Feature);
    
If LicManager.IsCheckedOut(Feature) Then
        CommuterInfo := LicManager.CommuterInfo(Feature);
        
If CommuterInfo <> Null Then
            Info.Add(
"Feature name: " + CommuterInfo.FeatureName);
            Info.Add(
"License description: " + LicManager.FeatureDescription(Feature));
            Info.Add(
"Effective from: " + CommuterInfo.StartDate.ToString);
            Info.Add(
"Effective to: " + CommuterInfo.ExpireDate.ToString);
            Info.Add(
"License server IP: " + CommuterInfo.IssuingServer);
        
End If;
    
Else
        Info.Add(
"Feature is not checked out from server");
    
End If;
End Sub Button1OnClick;

Enter name of the preinstalled feature into Editbox, for example, PP_OLAP, and click the button. If a temporary local license was checked out from license server, clicking the button in Memo displays information about it. If a temporary local license is not checked out from server, the appropriate message is displayed.

See also:

ILicenseManager