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


IExtensionManagerAdmin Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > System > ESRI.ArcGIS.esriSystem > Interfaces > IE > IExtensionManagerAdmin Interface
ArcGIS Developer Help

IExtensionManagerAdmin Interface

Provides access to members that give life to the extensions.

Product Availability

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

When To Use

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.

Members

Name Description
Method AddExtension Creates a single extension given the CLSID, then passes initializationData to IExtension::Startup.
Method ShutdownExtensions Shuts down and releases the extensions that are loaded and calls IExtension::Shutdown.
Method StartupExtensions Creates and starts the extensions for the given component category, passing initializationData to each in IExtension::Startup.

Classes that implement IExtensionManagerAdmin

Classes Description
ExtensionManager Extension Manager - a singleton.

Remarks

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.

See Also

IExtension Interface | IExtensionManagerAdmin Interface | IExtensionManager Interface | ExtensionManager Class