Interface IAoInitialize

Namespace
ESRI.ArcGIS.esriSystem
Assembly
ESRI.Server.System.dll

Provides access to members that initialize licensing for ArcGIS Desktop, Engine, and Server.

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("9AB6A638-ACA8-4820-830C-463EA11C8722")]
public interface IAoInitialize

Methods

CheckInExtension(esriLicenseExtensionCode)

Check in an extension.

esriLicenseStatus CheckInExtension(esriLicenseExtensionCode extensionCode)

Parameters

extensionCode esriLicenseExtensionCode

Returns

esriLicenseStatus

CheckOutExtension(esriLicenseExtensionCode)

Check out an extension.

esriLicenseStatus CheckOutExtension(esriLicenseExtensionCode extensionCode)

Parameters

extensionCode esriLicenseExtensionCode

Returns

esriLicenseStatus

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:

  • the extension is not licensed.
  • the license is unavailable because it is already being used. An extension may fail to check out because it may have been checked out by another application since the IsExtensionCodeAvailable method checked its availability. (Desktop Concurrent licenses only).
  • an unexpected license failure occurs due to system administration problems.
  • the license is already checked out. Use the IsExtensionCheckedOut method to determine this.

Initialize(esriLicenseProductCode)

This must be called before any other ArcObjects are created to initialize product Code. If called a second time during the life time of an executable with a new product code, it will return esriLicenseAlreadyInitialized.

esriLicenseStatus Initialize(esriLicenseProductCode ProductCode)

Parameters

ProductCode esriLicenseProductCode

Returns

esriLicenseStatus

Remarks

The Initialize method will fail to check out the specified product license if:

  • the license is unavailable because it is already being used (Desktop Concurrent licenses only).
  • an unexpected license failure occurs due to system administration problems.
  • the license is already initialized. An application is initialized with a product license for the duration of it life. Use the InitializedProduct method to determine what license an application is initialized with.

Note that loading data into the MapControl or PageLayoutControl through the property pages will automatically initialize the application with a product license. To ensure that the application is initialized with the product license specified by the Initialize method load data into the MapControl and PageLayoutControl programmatically after license initialization.

InitializedProduct()

Retrieve's the product code at which the application has been initialized.

esriLicenseProductCode InitializedProduct()

Returns

esriLicenseProductCode

IsExtensionCheckedOut(esriLicenseExtensionCode)

Is the Extension checked out.

bool IsExtensionCheckedOut(esriLicenseExtensionCode extensionCode)

Parameters

extensionCode esriLicenseExtensionCode

Returns

bool

IsExtensionCodeAvailable(esriLicenseProductCode, esriLicenseExtensionCode)

Check if the Product Code is available and then the Extension Code for that product.

esriLicenseStatus IsExtensionCodeAvailable(esriLicenseProductCode ProductCode, esriLicenseExtensionCode extensionCode)

Parameters

ProductCode esriLicenseProductCode
extensionCode esriLicenseExtensionCode

Returns

esriLicenseStatus

IsProductCodeAvailable(esriLicenseProductCode)

Check if the Product Code is available.

esriLicenseStatus IsProductCodeAvailable(esriLicenseProductCode ProductCode)

Parameters

ProductCode esriLicenseProductCode

Returns

esriLicenseStatus

Shutdown()

Shutdown method. This should be the last call to ArcObjects in an application.

void Shutdown()