This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > System > ESRI.ArcGIS.esriSystem > Interfaces > IA > IAoInitialize Interface > IAoInitialize.IsExtensionCodeAvailable Method (ArcObjects .NET 10.4 SDK) |
Check if the Product Code is available and then the Extension Code for that product.
[Visual Basic .NET] Public Function IsExtensionCodeAvailable ( _ ByVal ProductCode As esriLicenseProductCode, _ ByVal extensionCode As esriLicenseExtensionCode _ ) As esriLicenseStatus
[C#] public esriLicenseStatus IsExtensionCodeAvailable ( esriLicenseProductCode ProductCode, esriLicenseExtensionCode extensionCode );
[C++]
HRESULT IsExtensionCodeAvailable(
esriLicenseProductCode ProductCode,
esriLicenseExtensionCode extensionCode,
esriLicenseStatus* licenseStatus
);
[C++]
Parameters ProductCode [in]
ProductCode is a parameter of type esriLicenseProductCode extensionCode [in]
extensionCode is a parameter of type esriLicenseExtensionCode licenseStatus [out, retval]
licenseStatus is a parameter of type esriLicenseStatus
The IsExtensionCodeAvailable method returns whether the specified extension license is available with the specified product license that will be used to Initialize the application (not every extension license is available with every product license). The method firstly checks the availability of the product license and secondly checks the availability of the extension license with the product license.
When an application is initialized with a particular product license, a connection is made to a license server. All subsequent calls to the CheckOutExtension and CheckInExtension methods are made to the same license server. As such, you cannot use a combination of licenses from difference license servers or Engine Single Use.
If the licenses you require are available using Engine Single Use then we recommend you use it in preference to the Desktop Concurrent and Desktop Single Use licenses. This means you will not limit the Desktop Concurrent licenses available to any other users.
If an extension required by the application for it to run successfully is not available, the application should inform the user of the issue, and exit the application. If the extension functionality is not necessary for the application to function, and the extension license is unavailable, the application should disable to the user the functionality dependant upon the extension.