IExtenderProviderUnk.GetExtender Method

Definition

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

public:
 System::Object ^ GetExtender(System::String ^ ExtenderCATID, System::String ^ ExtenderName, System::Object ^ ExtendeeObject, EnvDTE::IExtenderSite ^ ExtenderSite, int Cookie);
public:
 Platform::Object ^ GetExtender(Platform::String ^ ExtenderCATID, Platform::String ^ ExtenderName, Platform::Object ^ ExtendeeObject, EnvDTE::IExtenderSite ^ ExtenderSite, int Cookie);
winrt::Windows::Foundation::IInspectable GetExtender(std::wstring const & ExtenderCATID, std::wstring const & ExtenderName, winrt::Windows::Foundation::IInspectable const & ExtendeeObject, EnvDTE::IExtenderSite const & ExtenderSite, int Cookie);
[System.Runtime.InteropServices.DispId(1)]
public object GetExtender (string ExtenderCATID, string ExtenderName, object ExtendeeObject, EnvDTE.IExtenderSite ExtenderSite, int Cookie);
[<System.Runtime.InteropServices.DispId(1)>]
abstract member GetExtender : string * string * obj * EnvDTE.IExtenderSite * int -> obj
Public Function GetExtender (ExtenderCATID As String, ExtenderName As String, ExtendeeObject As Object, ExtenderSite As IExtenderSite, Cookie As Integer) As Object

Parameters

ExtenderCATID
String

The CATID for the extender being requested.

ExtenderName
String

The name for the extender being requested.

ExtendeeObject
Object

The extendee object.

ExtenderSite
IExtenderSite

The extender site, represented by an IExtenderSite interface.

Cookie
Int32

The cookie identifying the extender.

Returns

An extender.

Attributes

Remarks

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.

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.

Note

The extendee object is passed as an IUnknown interface.

Applies to