This document is archived and information here might be outdated.  Recommended version.


ILicenseControlDefault.LicenseAvailability Property (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Controls)  

ILicenseControlDefault.LicenseAvailability Property

A Description of the availability of the licenses either all licenses or just those specified in the LicenseControls property page.

[Visual Basic .NET]
Public Function get_LicenseAvailability ( _
    [ByVal option As esriLicenseStatusOptions] _
) As String
[C#]
public string get_LicenseAvailability (
    esriLicenseStatusOptions option
);
[C++]
HRESULT get_LicenseAvailability(
  esriLicenseStatusOptions option,
  BSTR* Description
);
[C++]

Parameters option [in, optional, defaultvalue(1)]
option is a parameter of type esriLicenseStatusOptions Description [out, retval] Description is a parameter of type BSTR

Product Availability

Available with ArcGIS Engine.

Description

Returns a string specifying the current availability of the specified product and extension licenses. The string that is returned is formatted with carriage returns and line feeds. Use the LicenseAvailability property when license initialization fails, to give information to the user on the nature of the failure, before programmatically shutting down the application.

esriLicenseStatusRequested returns the availability of those product and extension licenses checked in the LicenseControl property pages. Use this option when license initialization fails, to give information to the user on the nature of the failure, before programmatically shutting down the application.

esriLicenseStatusAll returns the availability of all product and extension licenses. Use this option when debugging.

Remarks

The default behaviour of the LicenseControl is to allow the developer to programmatically check for and shutdown an application when license initialization fails. To override this behaviour so the LicenseControl automatically shuts down an application when license initialization fails, check the "Shutdown this application if the selected licenses are not available" check box in the property pages of the LicenseControl.

[C#]

In C# use the get_LicenseAvailability method, as indexed property accessors are not supported.

[Visual Basic .NET]

The ILicenseControlDefault, (and higher numbered ILicenseControlDefault interfaces) and ILicenseControlDefaultDefault interfaces have a default indexed property called LicenseAvailability. The Controls interop assembly which provides access to these interfaces have the default LicenseAvailability property. However, if you are working directly with the AxControls class use the get_LicenseAvailability method.

See Also

ILicenseControlDefault Interface