ArcObjects Library Reference (System)  

IAoInitialize.CheckOutExtension Method

Check out an extension.

[Visual Basic .NET]
Public Function CheckOutExtension ( _
    ByVal extensionCode As esriLicenseExtensionCode _
) As esriLicenseStatus
[C#]
public esriLicenseStatus CheckOutExtension (
    esriLicenseExtensionCode extensionCode
);
[C++]
HRESULT CheckOutExtension(
  esriLicenseExtensionCode extensionCode,
  esriLicenseStatus* licenseStatus
);
[C++]

Parameters

extensionCode [in]

  extensionCode is a parameter of type esriLicenseExtensionCode

licenseStatus [out, retval]

  licenseStatus is a parameter of type esriLicenseStatus

Product Availability

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

Description

Checks out the specified extension license. Extensions can either be checked out as and when an application requires the extension functionality, and checked in once the application has finished with the functionality; or the extension can be checked out directly after the application is initialized and checked back in before Shutdown. Use the CheckInExtension method to check extensions back in. The way that the extensions are checked in and out will depend on the type of product license passed to the Initialize method.

Using the CheckOutExtension method to check out an extension in an ArcGIS for Desktop application will not enable the user interface objects in the extension. Use the IExtension object to access the extension functionality and limit the use of the AoInitialize object to testing the availability of extension licenses and determining the extensions already checked out.

Remarks

If an application using extension functionality is initialized with an Engine single use license (ArcGIS Engine or ArcGIS Engine with Enterprise GeoDatabase) the extension license may automatically get checked out. This is because Engine single use licenses are not reference counted. It is highly recommended that extension licenses are always explicitly checked out using the CheckOutExtension method to support deployment of the application in both an environment that uses an Engine single use license and an environment that uses a license server (desktop single use or desktop concurrent licenses).

The CheckOutExtension method will fail to check out the specified extension license if:

See Also

IAoInitialize Interface