CheckinCommuterLicense(FeatureName: String): UiLicenseStatusCode;
FeatureName. Feature name.
The CheckinCommuterLicense method checks in a local license, enabling the temporary use of application offline, to license server.
The method is relevant after a temporary license is checked out from license server using the ILicenseManager.CheckoutCommuterLicense method.
To successfully check in license to server, license search settings and settings determined at the moment when temporary license was checked out from license server should match.
To execute the example, place the Button and Editbox buttons named Button1 and Editbox1 on the form.
Add links to the Host, Ui, Forms 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;
StatusCode: UiLicenseStatusCode;
Begin
LicManager := WinApplication.Instance.LicenseManager;
Feature := EditBox1.Text;
FeatureInfo := LicManager.FeatureInfo(Feature);
If LicManager.IsCheckedOut(Feature) Then
StatusCode := LicManager.CheckinCommuterLicense(Feature);
If StatusCode = UiLicenseStatusCode.Success Then
WinApplication.InformationBox("License is checked in successfully");
Else
WinApplication.InformationBox("Error: " + StatusCode.ToString);
End If;
Else
WinApplication.InformationBox("License was 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 the specified feature was previously checked out from license server, it is checked in. If errors occur on check out, the message with a code of the occurred error is displayed.
See also: