This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > System > ESRI.ArcGIS.esriSystem > Interfaces > IE > IExtensionManagerAdmin Interface (ArcObjects .NET 10.4 SDK) |
Provides access to members that give life to the extensions.
If you are building an application that makes use of licensed extension functionality like Spatial Analyst, 3D Analyst, or ArcPress, you need to take responsibility for enabling the extension you're using. You can use the IExtensionManagerAdmin interface to control the lifetime of an extension inside your application.
Description | ||
---|---|---|
AddExtension | Creates a single extension given the CLSID, then passes initializationData to IExtension::Startup. | |
ShutdownExtensions | Shuts down and releases the extensions that are loaded and calls IExtension::Shutdown. | |
StartupExtensions | Creates and starts the extensions for the given component category, passing initializationData to each in IExtension::Startup. |
CoClasses and Classes | Description |
---|---|
ExtensionManager | Extension Manager - a singleton. |
Before you use a licensed extension, you need to load it and enable it. You load the extension using the IExtensionManagerAdmin AddExtension method and passing in the CLSID of the extension. Then before you use the extension, you need to enable it.
To enable the extension, find the extension using the IExtensionManager FindExtension method, obtain IExtensionConfig on the extension, and then set the State property to esriESEnabled. Keep in mind that setting this property may fail, so be prepared to handle that in your application. If enabling the extension succeeds, that means that the license was checked out. If not, then the license could not be acquired.
If during the life of your application, you want to give the license back, simply set the state to esriESDisabled. If that succeeds the license was checked back in. If it failed that means there are outstanding objects (from the extension) that are still using the license.
There is no need to use IExtensionManagerAdmin from within the standard ESRI applications, such as ArcMap, since the loading and unloading of extensions is done automatically. However, you may sometimes control license usage with IExtensionConfig.
IExtension Interface | IExtensionManagerAdmin Interface | IExtensionManager Interface | ExtensionManager Class