Class initializes ArcObject components runtime environment. This class must be the first ArcObject created.
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:
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 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.
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.
|IAoInitialize||Provides access to members that initialize Licensing for ArcGIS Engine.|
|ILicenseInformation||Provides access to retrieve the name for license product code.|
|ISupportErrorInfo (esriSystem)||Indicates whether a specific interface can return Automation error objects.|
Explicit component license initialization is not required when working in the VBA environment in ArcGIS Desktop (ArcMap, ArcCatalog, ArcGlobe, ArcScene) as this is performed automatically when the application starts.