IExtenderProvider::GetExtender Method (String^, String^, Object^, IExtenderSite^, Int32)
Gets an extender for the given object in the specified category.
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.
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 the ExtenderSite object and Cookie.
Warning |
|---|
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. |
