This documentation is archived and is not being maintained.

RegisterExtenderProvider Method

Visual Studio .NET 2003

Registers an Extender Provider for a specific Extender category.

[Visual Basic .NET]
Public Function RegisterExtenderProvider( _
   ByVal ExtenderCATID As String, _
   ByVal ExtenderName As String, _
   ByVal ExtenderProvider As IExtenderProvider, _
   Optional ByVal LocalizedName As String = "" _
) As Integer
[Visual Basic 6]
Function RegisterExtenderProvider( _
   ByVal ExtenderCATID As String, _
   ByVal ExtenderName As String, _
   ByVal ExtenderProvider As IExtenderProvider, _
   Optional ByVal LocalizedName As String = "" _
) As Int
[C++]
HRESULT __stdcall RegisterExtenderProvider(
   BSTR ExtenderCATID,
   BSTR ExtenderName,
   IExtenderProvider* ExtenderProvider,
   BSTR LocalizedName,
   /* [out, retval] */ int* Cookie
);
[C#]
public int RegisterExtenderProvider(
   string ExtenderCATID,
   string ExtenderName,
   IExtenderProvider ExtenderProvider,
   string LocalizedName
);
[JScript .NET]
public function RegisterExtenderProvider(
   ExtenderCATID : String,
   ExtenderName : String,
   ExtenderProvider : IExtenderProvider,
   LocalizedName : String
) : int

Parameters

ExtenderCATID
Required. The Extender CATID.
ExtenderName
Required. The Extender name. This is the programmatic name for the Extender and is used in the call to GetExtender.
ExtenderProvider
Required. The Extender Provider which implements the IExtenderProvider interface.
LocalizedName
Optional. The localized display name for the Extender.

Return Value

Returns 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 under a particular CATID and name with the ObjectExtenders object. An Extender Provider can register as many Extenders as it wants, under one or more CATIDs.

There are two way to register Extender Providers:

  • Statically, under the appropriate Extender CATID subkey under the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\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.

See Also

Implementing and Using Automation Extenders | Extender Property (General Extensibility) | RegisterExtenderProviderUnk Method

Applies To: ObjectExtenders Object

Show: