Partager via


IVsLibrary2.AddBrowseContainer Method

Definition

Adds a browse container to be browsed by the library.

int AddBrowseContainer(std::Array <Microsoft::VisualStudio::Shell::Interop::VSCOMPONENTSELECTORDATA> const & pcdComponent, [Runtime::InteropServices::Out] unsigned int & pgrfOptions, std::Array <std::wstring const &> const & pbstrComponentAdded);
public int AddBrowseContainer (Microsoft.VisualStudio.Shell.Interop.VSCOMPONENTSELECTORDATA[] pcdComponent, out uint pgrfOptions, string[] pbstrComponentAdded);
abstract member AddBrowseContainer : Microsoft.VisualStudio.Shell.Interop.VSCOMPONENTSELECTORDATA[] * uint32 * string[] -> int
Public Function AddBrowseContainer (pcdComponent As VSCOMPONENTSELECTORDATA(), ByRef pgrfOptions As UInteger, Optional pbstrComponentAdded As String()) As Integer

Parameters

pcdComponent
VSCOMPONENTSELECTORDATA[]

[in] Specifies attributes that identify the added component.

pgrfOptions
UInt32

[in, out] Values are taken from the _LIB_ADDREMOVEOPTIONS enumeration.

pbstrComponentAdded
String[]

[out, optional] pointer to a bstr containing the text to display for the added component.

Returns

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

Remarks

COM Signature

From vsshell80.idl:

HRESULT AddBrowseContainer(  
   [in] PVSCOMPONENTSELECTORDATA pcdComponent,   
   [in, out] LIB_ADDREMOVEOPTIONS *pgrfOptions,   
   [out, optional] BSTR *pbstrComponentAdded);  

This method adds the component specified by the values in the VSCOMPONENTSELECTORDATA structure to your global browse container. If the component is already present, this method returns LARO_ALREADYADDED in the PgrfOptions parameter. If the component has been added through a file open operation, the environment sets pgrfOptions to LARO_THRUFILEOPS as an input parameter. This method sets the pbstrComponentAdded parameter to the name you want to be displayed in the Add Reference dialog box. This name should be the same name as that returned with a call to GetText.

The environment only calls this method for registered libraries of a global browse container.

Applies to