Compartilhar via


IExtenderProviderUnk.GetExtender Method

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

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

Syntax

'Declaration
Function GetExtender ( _
    ExtenderCATID As String, _
    ExtenderName As String, _
    ExtendeeObject As Object, _
    ExtenderSite As IExtenderSite, _
    Cookie As Integer _
) As Object
Object GetExtender(
    string ExtenderCATID,
    string ExtenderName,
    Object ExtendeeObject,
    IExtenderSite ExtenderSite,
    int Cookie
)
Object^ GetExtender(
    [InAttribute] String^ ExtenderCATID, 
    [InAttribute] String^ ExtenderName, 
    [InAttribute] Object^ ExtendeeObject, 
    [InAttribute] IExtenderSite^ ExtenderSite, 
    [InAttribute] int Cookie
)
abstract GetExtender : 
        ExtenderCATID:string * 
        ExtenderName:string * 
        ExtendeeObject:Object * 
        ExtenderSite:IExtenderSite * 
        Cookie:int -> Object
function GetExtender(
    ExtenderCATID : String, 
    ExtenderName : String, 
    ExtendeeObject : Object, 
    ExtenderSite : IExtenderSite, 
    Cookie : int
) : Object

Parameters

  • ExtenderCATID
    Type: System.String

    The CATID for the extender being requested.

  • ExtenderName
    Type: System.String

    The name for the extender being requested.

  • Cookie
    Type: System.Int32

    The cookie identifying the extender.

Return Value

Type: System.Object
An extender.

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.

.NET Framework Security

See Also

Reference

IExtenderProviderUnk Interface

EnvDTE Namespace

Other Resources

Implementing and Using Automation Extenders