IVsSimpleLibrary2::AddBrowseContainer Method (array<VSCOMPONENTSELECTORDATA>^, UInt32, String^)

 

Adds a browse container to be browsed by the library.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

int AddBrowseContainer(
	array<VSCOMPONENTSELECTORDATA>^ pcdComponent,
	unsigned int% pgrfOptions,
	[OutAttribute] String^% pbstrComponentAdded
)

Parameters

pcdComponent
Type: array<Microsoft.VisualStudio.Shell.Interop::VSCOMPONENTSELECTORDATA>^

[in] A VSCOMPONENTSELECTORDATA object which specifies attributes that identify the added component.

pgrfOptions
Type: System::UInt32

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

pbstrComponentAdded
Type: System::String^

[out] Returns a string containing the text to display for the added component.

Return Value

Type: System::Int32

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

From vsshell80.idl:

HRESULT IVsSimpleLibrary2::AddBrowseContainer(
   [in]      PVSCOMPONENTSELECTORDATA  pcdComponent, 
   [in, out] LIB_ADDREMOVEOPTIONS     *pgrfOptions, 
   [out]     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 by a call to GetText.

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

Return to top
Show: