Interface ExtensionManager
- Namespace
- ESRI.ArcGIS.esriSystem
- Assembly
- ESRI.Server.System.dll
Extension Manager - a singleton.
[Guid("05C71634-D9D5-4D6F-B68E-D7661142FA06")]
public interface ExtensionManager : IExtensionManager
- Inherited Members
Remarks
If you are building an application that makes use of licensed extension functionality like ArcGIS Spatial Analyst, ArcGIS 3D Analyst, or ArcPress for ArcGIS, you need to take responsibility for enabling the extension you're using.
The ExtensionManager was designed for this purpose. The model is that you create the ExtensionManager and hold onto it for the life of your application. Before you use a licensed extension, you need to load it and enable it. You load the extension using IExtensionManagerAdmin::AddExtension 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 IExtensionManager::FindExtension , QI for 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.