IWinApplication.LicenseManager

Syntax

LicenseManager: IUiLicenseManager;

Description

The LicenseManager property returns license manager.

Example

Executing the example requires a form with a button and the EditBox component named EditBox1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    LicManager: IUiLicenseManager;
    Feature: String;
    FeatureInfo: IUiLicenseFeatureInfo;
    Status: UiLicenseStatusCode;
Begin
    LicManager := WinApplication.Instance.LicenseManager;
    Feature := EditBox1.Text;
    FeatureInfo := LicManager.GetFeatureInfo(Feature);
    If FeatureInfo.CommuterAllowed Then
        Status := LicManager.CheckoutCommuterLicense(Feature);
        LicManager.Refresh;
        If Status <> 0 Then
            WinApplication.InformationBox(Status.ToString);
        End If;
    End If;
End Sub Button1OnClick;

A local license is checked out for the feature entered into the edit box, if it is possible. A message with error code is displayed if an error occurs.

See also:

IWinApplication