ObjectExtenders.RegisterExtenderProvider Method

Registers an Extender Provider for a specific Extender category.

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

Syntax

'Declaration
Function RegisterExtenderProvider ( _
    ExtenderCATID As String, _
    ExtenderName As String, _
    ExtenderProvider As IExtenderProvider, _
    LocalizedName As String _
) As Integer
int RegisterExtenderProvider(
    string ExtenderCATID,
    string ExtenderName,
    IExtenderProvider ExtenderProvider,
    string LocalizedName
)
int RegisterExtenderProvider(
    [InAttribute] String^ ExtenderCATID, 
    [InAttribute] String^ ExtenderName, 
    [InAttribute] IExtenderProvider^ ExtenderProvider, 
    [InAttribute] String^ LocalizedName
)
abstract RegisterExtenderProvider : 
        ExtenderCATID:string * 
        ExtenderName:string * 
        ExtenderProvider:IExtenderProvider * 
        LocalizedName:string -> int
function RegisterExtenderProvider(
    ExtenderCATID : String, 
    ExtenderName : String, 
    ExtenderProvider : IExtenderProvider, 
    LocalizedName : String
) : int

Parameters

  • ExtenderCATID
    Type: System.String

    Required. The Extender CATID.

  • ExtenderName
    Type: System.String

    Required. The Extender name. This is the programmatic name for the Extender and is used in the call to GetExtender.

  • LocalizedName
    Type: System.String

    Optional. The localized display name for the Extender.

Return Value

Type: System.Int32
An integer-valued cookie that identifies the registration. This cookie must be passed back during UnregisterExtenderProvider.

Remarks

RegisterExtenderProvider is used by an Extender Provider to dynamically register itself with the ObjectExtenders object under a particular CATID and name. An Extender Provider can register more than one Extender under one or more CATIDs.

There are two ways to register Extender Providers:

  • Statically, under the appropriate Extender CATID subkey in the registry key, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Extenders, during the installation of your add-in.

  • Dynamically, by calling this method in an add-in's OnConnection method.

    Note

    Dynamically-registered Extender Providers must unregister themselves by calling UnregisterExtenderProvider during shutdown. Statically registered providers should not do so.

.NET Framework Security

See Also

Reference

ObjectExtenders Interface

EnvDTE Namespace

Other Resources

Implementing and Using Automation Extenders