ArcObjects Library Reference (System)  

IExtensionManager.FindExtension Method

Finds the extension by CLSID (IUID) or name (String).

[Visual Basic .NET]
Public Function FindExtension ( _
    ByVal nameOrID As Object _
) As IExtension
[C#]
public IExtension FindExtension (
    object nameOrID
);
[C++]
HRESULT FindExtension(
  VARIANT nameOrID,
  IExtension** Extension
);
[C++]

Parameters

nameOrID [in]   nameOrID is a parameter of type VARIANT Extension [out, retval]

  Extension is a parameter of type IExtension

Product Availability

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

Description

The FindExtension method will get an extension by either its name string or by its CLSID. Using IExtensionManager is not the only way to get a reference to an extension; the IApplication interface has FindExtensionByCLSID and FindExtensionByName methods.

nameOrID is a variant representing the identifier of the extension. This can either be the UID of the extension or the name string.

Remarks

COM coclasses are identified by a globally unique identifier (GUID). There two formats for the GUID for a coclass: a class ID (CLSID) and a ProgID. The ProgID is a text alias for a CLSID. The UID coclass can be used to represent the GUID of an extension object. You can set the IUID.Value property to either the CLSID or the ProgID.

To find the Name, CLSID, and ProgID of an ESRI extension, refer to the following technical document:

ArcObjects Developer Help > Technical Documents > Names and IDs > Extensions

See Also

IExtensionManager Interface

.NET Snippets

Display Extension State on Status Bar |

.NET Samples

Creating a zoom factor extension that works with a ToolbarControl (Code Files: ToolbarControlExtension) | Implementing a schematic digitizing tool (Code Files: DigitTool) | Package a PMF (Code Files: PackagePMF) | Publish a map (Code Files: PublishMap) |

.NET Related Topics

3DAnalystUI | GeoAnalyst | Working with the ArcGIS snapping environment |