Export (0) Print
Expand All

IExtenderProviderUnk.GetExtender Method

Returns an extender for the given object under the specified category.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Object GetExtender(
	string ExtenderCATID,
	string ExtenderName,
	Object ExtendeeObject,
	IExtenderSite ExtenderSite,
	int Cookie


Type: System.String

The CATID for the extender being requested.

Type: System.String

The name for the extender being requested.

Type: System.Object

The extendee object.

Type: EnvDTE.IExtenderSite

The extender site, represented by an IExtenderSite interface.

Type: System.Int32

The cookie identifying the extender.

Return Value

Type: System.Object
An extender.

GetExtender returns the extender for the given CATID and name for the specified extendee instance. This method is called only if CanExtend returns true.

The extender provider must keep ExtenderSite object and Cookie.

Caution noteCaution

The extender manager maintains an internal cache of extender objects, and must be notified when they are being destroyed. You must call NotifyDelete immediately upon destroying extender objects. You must not wait for the application to become idle, because other Visual Studio components may try to access the destroyed extender object before you call the method. If this happens, Visual Studio may crash.


The extendee object is passed as an IUnknown interface.

© 2014 Microsoft