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
)

Parameters

ExtenderCATID
Type: System.String

The CATID for the extender being requested.

ExtenderName
Type: System.String

The name for the extender being requested.

ExtendeeObject
Type: System.Object

The extendee object.

ExtenderSite
Type: EnvDTE.IExtenderSite

The extender site, represented by an IExtenderSite interface.

Cookie
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.

NoteNote

The extendee object is passed as an IUnknown interface.

Show:
© 2014 Microsoft