ILicenseManager.DeleteFeature

Syntax

DeleteFeature(FeatureName: String): UiLicenseStatusCode;

Parameters

FeatureName.Feature name.

Description

The DeleteFeature method deletes license code from the current session (from memory).

Comments

The method is relevant when a stand-alone license is used, otherwise the appropriate message is displayed.

If activation code was saved in the license file, the code should be deleted manually.

Example

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;
    StatusCode: UiLicenseStatusCode;
Begin
    LicManager := WinApplication.Instance.LicenseManager;
    Feature := Editbox1.Text;
    StatusCode := LicManager.DeleteFeature(Feature);
    
If StatusCode = UiLicenseStatusCode.Success Then
        WinApplication.InformationBox(
"Code is successfully deleted");
    
Else
        WinApplication.InformationBox(
"Error: " + StatusCode.ToString);
    
End If;

End Sub Button1OnClick;

Clicking the button deletes the code for the feature specified in Editbox for the current session. The appropriate message is displayed with code deleting result. If errors occur on deleting, the message with the code of the occurred error is displayed.

See also:

ILicenseManager