ObjectExtenders.RegisterExtenderProviderUnk Method

Registers an Extender Provider for an IUnknown-based Extender category.

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

Syntax

'Declaration
Function RegisterExtenderProviderUnk ( _
    ExtenderCATID As String, _
    ExtenderName As String, _
    ExtenderProvider As IExtenderProviderUnk, _
    LocalizedName As String _
) As Integer
int RegisterExtenderProviderUnk(
    string ExtenderCATID,
    string ExtenderName,
    IExtenderProviderUnk ExtenderProvider,
    string LocalizedName
)
int RegisterExtenderProviderUnk(
    [InAttribute] String^ ExtenderCATID, 
    [InAttribute] String^ ExtenderName, 
    [InAttribute] IExtenderProviderUnk^ ExtenderProvider, 
    [InAttribute] String^ LocalizedName
)
abstract RegisterExtenderProviderUnk : 
        ExtenderCATID:string * 
        ExtenderName:string * 
        ExtenderProvider:IExtenderProviderUnk * 
        LocalizedName:string -> int
function RegisterExtenderProviderUnk(
    ExtenderCATID : String, 
    ExtenderName : String, 
    ExtenderProvider : IExtenderProviderUnk, 
    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 cookiethat identifies the registration. This cookie must be passed back during UnregisterExtenderProvider.

Remarks

RegisterExtenderProviderUnk is used by an IUnknown-based 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