Sdílet prostřednictvím


IVsToolbox2.RegisterDataProvider(IVsToolboxDataProvider, UInt32) Method

Definition

Registers a Toolbox data provider.

public:
 int RegisterDataProvider(Microsoft::VisualStudio::Shell::Interop::IVsToolboxDataProvider ^ pDP, [Runtime::InteropServices::Out] System::UInt32 % pdwProvider);
int RegisterDataProvider(Microsoft::VisualStudio::Shell::Interop::IVsToolboxDataProvider const & pDP, [Runtime::InteropServices::Out] unsigned int & pdwProvider);
public int RegisterDataProvider (Microsoft.VisualStudio.Shell.Interop.IVsToolboxDataProvider pDP, out uint pdwProvider);
abstract member RegisterDataProvider : Microsoft.VisualStudio.Shell.Interop.IVsToolboxDataProvider * uint32 -> int
Public Function RegisterDataProvider (pDP As IVsToolboxDataProvider, ByRef pdwProvider As UInteger) As Integer

Parameters

pDP
IVsToolboxDataProvider

[in] Pointer to the Toolbox data provider to register.

pdwProvider
UInt32

[out, retval] Unique cookie identifying the newly registered Toolbox data provider.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Implements

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsToolbox2::RegisterDataProvider(  
   [in]IVsToolboxDataProvider* pDP,  
   [out, retval]VSCOOKIE* pdwProvider  
);  

Register with the Toolbox when your VSPackage is loaded. Use the pdwProvider value returned with this method to unregister the data provider using UnregisterDataProvider.

Applies to