Class initializes ArcObject components runtime environment. This class must be the first ArcObject created.
Product Availability
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.
- Engine Single Use provides access to either the ArcGIS Engine or Engine with GeoDatabase Editing licenses.
- Desktop Concurrent licenses provide access to the Desktop concurrent ArcView, ArcEditor and ArcInfo licenses.
- Desktop Single Use licenses use the same technology as Desktop Concurrent licenses and provide access to Single Use ArcView, ArcEditor and ArcInfo licenses. There is no mechanism for a developer to differentiate between a Single Use and a Desktop Concurrent license so they should be treated as the same.
Initialization of an application with a license must be performed in the following order:
- Check the product license is available with the IsProductCodeAvailable method.
- Check extension licenses are available (if required) with the IsExtensionCodeAvailable method.
- Initialize the application with the product license.
- As required, check out and in the extension(s) c by calling the CheckOutExtension and CheckInExtension methods.
- 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:
- The types of product license that the application can run with. For example, an enterprise geodatabase editing application will not be able to run with an ArcGIS Engine license or an ArcView license. However, it will be able to run with an ArcGIS Engine GeoDatabase Editing license, an ArcEditor license or an ArcInfo license.
- The types of product license available to the application. For example, an application that can be run with an ArcGIS Engine license will also run with an ArcView, ArcEditor and ArcInfo license. However, it may not be desirable to consume more than the minimum required license as doing so would lock the license for the lifetime of the application.
Using an ArcView license on an ArcGIS Engine application will
give you access to all the functionality available to a standard
Engine license. Likewise, using an ArcEditor license on an
ArcGIS Engine application will give you access to all the
functionality available to an Engine license with GeoDatabase
Editing.
Supported Platforms
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 (esriSystem) | Indicates whether a specific interface can return Automation error objects. |