Share via


ObjectExtenders.RegisterExtenderProviderUnk Method

Definition

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

int RegisterExtenderProviderUnk(std::wstring const & ExtenderCATID, std::wstring const & ExtenderName, EnvDTE::IExtenderProviderUnk const & ExtenderProvider, std::wstring const & LocalizedName = "");
[System.Runtime.InteropServices.DispId(9)]
public int RegisterExtenderProviderUnk (string ExtenderCATID, string ExtenderName, EnvDTE.IExtenderProviderUnk ExtenderProvider, string LocalizedName = "");
[<System.Runtime.InteropServices.DispId(9)>]
abstract member RegisterExtenderProviderUnk : string * string * EnvDTE.IExtenderProviderUnk * string -> int
Public Function RegisterExtenderProviderUnk (ExtenderCATID As String, ExtenderName As String, ExtenderProvider As IExtenderProviderUnk, Optional LocalizedName As String = "") As Integer

Parameters

ExtenderCATID
String

Required. The Extender CATID.

ExtenderName
String

Required. The Extender name. This is the programmatic name for the Extender and is used in the call to GetExtender(String, String, Object).

ExtenderProvider
IExtenderProviderUnk

Required. The Extender Provider which implements the IExtenderProviderUnk interface.

LocalizedName
String

Optional. The localized display name for the Extender.

Returns

An integer-valued cookiethat identifies the registration. This cookie must be passed back during UnregisterExtenderProvider(Int32).

Attributes

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\<version number>\Extenders, during the installation of your extension.

  • Note

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

Applies to