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


AoInitialize Class (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > System > ESRI.ArcGIS.esriSystem > Classes > A > AoInitialize Class
ArcGIS Developer Help

AoInitializeClass Class

Class initializes ArcObject components runtime environment. This class must be the first ArcObject created.

Product Availability

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

Description

The AoInitialize object must be used by developers to initialize each application with a suitable license(s) in order for it to run successfully on any machine it is deployed on to. License configuration must be undertaken at application start time, before any ArcObjects are accessed. Failure to do so will result in application errors. 

All applications need to be configured with a license except when the application is not a stand-alone executable, i.e., if it's a dll that will be incorporated into an application that will itself perform the license configuration.

There are two types of license to consider when initializing an application, esriLicenseProductCodes and esriLicenseExtensionCodes, if an application uses any of the ArcGIS extensions. These licenses can be Engine Single Use, Desktop Single Use, or Desktop Concurrent licenses.

Initialization of an application with a license must be performed in the following order:

  1. Check that the product license is available with the IsProductCodeAvailable method.
  2. Check that extension licenses are available (if required) with the IsExtensionCodeAvailable method.
  3. Initialize the application with the product license.
  4. As required, check out and in the extension(s) by calling the CheckOutExtension and CheckInExtension methods.
  5. Shutdown the application.

Once an application has been initialized with a license, it cannot be re-initialized (with a new license); an application is initialized with a license for the duration of its life. When initializing an application with a license the following must be considered:

Using a Desktop Basic license on an ArcGIS Engine application will give you access to all the functionality available to a standard Engine license.  Likewise, using a Descktop Standard license on an ArcGIS Engine application will give you access to all the functionality available to an Engine license with GeoDatabase Editing.

Supported Platforms

Windows, Solaris, Linux

Extended Error Information

Use the ISupportErrorInfo method InterfaceSupportsErrorInfo to determine if the object supports extended error information. If the object supports extended error info, VC++ developers should use the OLE/COM IErrorInfo interface to access the ErrorInfo object. Visual Basic developers should use the global error object Err to retrieve this extended error information.

Interfaces

Interfaces Description
IAoInitialize Provides access to members that initialize licensing for ArcGIS Desktop, Engine, and Server.
ILicenseInformation Provides access to retrieve the name for license product code.
ISupportErrorInfo