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

IAoInitialize.IsExtensionCodeAvailable Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > System > ESRI.ArcGIS.esriSystem > Interfaces > IA > IAoInitialize Interface > IAoInitialize.IsExtensionCodeAvailable Method
ArcGIS Developer Help

IAoInitialize.IsExtensionCodeAvailable Method

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
public esriLicenseStatus IsExtensionCodeAvailable (
    esriLicenseProductCode ProductCode,
    esriLicenseExtensionCode extensionCode
HRESULT IsExtensionCodeAvailable(
  esriLicenseProductCode ProductCode,
  esriLicenseExtensionCode extensionCode
ProductCode [in]

ProductCode is a parameter of type esriLicenseProductCode extensionCode [in]
extensionCode is a parameter of type esriLicenseExtensionCode

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


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.

See Also

IAoInitialize Interface