Share via


ObjectExtenders.RegisterExtenderProvider Method

Definition

Registers an Extender Provider for a specific Extender category.

int RegisterExtenderProvider(std::wstring const & ExtenderCATID, std::wstring const & ExtenderName, EnvDTE::IExtenderProvider const & ExtenderProvider, std::wstring const & LocalizedName = "");
[System.Runtime.InteropServices.DispId(3)]
public int RegisterExtenderProvider (string ExtenderCATID, string ExtenderName, EnvDTE.IExtenderProvider ExtenderProvider, string LocalizedName = "");
[<System.Runtime.InteropServices.DispId(3)>]
abstract member RegisterExtenderProvider : string * string * EnvDTE.IExtenderProvider * string -> int
Public Function RegisterExtenderProvider (ExtenderCATID As String, ExtenderName As String, ExtenderProvider As IExtenderProvider, 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
IExtenderProvider

Required. The Extender Provider which implements the IExtenderProvider interface.

LocalizedName
String

Optional. The localized display name for the Extender.

Returns

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

Attributes

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 extension.

  • Note

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

Applies to