IVsLibrary.AddBrowseContainer Method
Adds a browse container to be browsed by the library.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
‘선언
Function AddBrowseContainer ( _
pcdComponent As VSCOMPONENTSELECTORDATA(), _
<OutAttribute> ByRef pgrfOptions As UInteger, _
<OutAttribute> ByRef pbstrComponentAdded As String _
) As Integer
‘사용 방법
Dim instance As IVsLibrary
Dim pcdComponent As VSCOMPONENTSELECTORDATA()
Dim pgrfOptions As UInteger
Dim pbstrComponentAdded As String
Dim returnValue As Integer
returnValue = instance.AddBrowseContainer(pcdComponent, _
pgrfOptions, pbstrComponentAdded)
int AddBrowseContainer(
VSCOMPONENTSELECTORDATA[] pcdComponent,
out uint pgrfOptions,
out string pbstrComponentAdded
)
int AddBrowseContainer(
[InAttribute] array<VSCOMPONENTSELECTORDATA>^ pcdComponent,
[InAttribute] [OutAttribute] unsigned int% pgrfOptions,
[OutAttribute] String^% pbstrComponentAdded
)
abstract AddBrowseContainer :
pcdComponent:VSCOMPONENTSELECTORDATA[] *
pgrfOptions:uint32 byref *
pbstrComponentAdded:string byref -> int
function AddBrowseContainer(
pcdComponent : VSCOMPONENTSELECTORDATA[],
pgrfOptions : uint,
pbstrComponentAdded : String
) : int
Parameters
- pcdComponent
Type: array<Microsoft.VisualStudio.Shell.Interop.VSCOMPONENTSELECTORDATA[]
[in] 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] pointer to 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.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsLibrary::AddBrowseContainer(
[in] PVSCOMPONENTSELECTORDATA pcdComponent,
[in, out] LIB_ADDREMOVEOPTIONS *pgrfOptions,
[out] BSTR *pbstrComponentAdded
);
Add the component specified by the values in the structure VSCOMPONENTSELECTORDATA to your global browse container. If the component is already present, return LARO_ALREADYADDED in the PgrfOptions parameter. If the component has been added through a file open operation, the environment will set pgrfOptions to LARO_THRUFILEOPS as an input parameter. Set 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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.