IVsLibrary.AddBrowseContainer 方法

将库要浏览的浏览一个容器。

命名空间:  Microsoft.VisualStudio.Shell.Interop
程序集:  Microsoft.VisualStudio.Shell.Interop(在 Microsoft.VisualStudio.Shell.Interop.dll 中)

语法

声明
Function AddBrowseContainer ( _
    pcdComponent As VSCOMPONENTSELECTORDATA(), _
    <OutAttribute> ByRef pgrfOptions As UInteger, _
    <OutAttribute> ByRef pbstrComponentAdded As String _
) As Integer
int AddBrowseContainer(
    VSCOMPONENTSELECTORDATA[] pcdComponent,
    out uint pgrfOptions,
    out string pbstrComponentAdded
)

参数

  • pbstrComponentAdded
    类型:System.String%
    [out] 对包含文本的字符串的指针为添加了元素显示。

返回值

类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 vsshell.idl:

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

添加值指定的元素在结构 VSCOMPONENTSELECTORDATA 到全局浏览容器。 如果元素已存在,则返回在 PgrfOptions 参数的 LARO_ALREADYADDED 。 如果元素通过打开文件操作已添加,环境将设置 pgrfOptions 到 LARO_THRUFILEOPS 作为输入参数。 设置 pbstrComponentAdded 参数传递到 添加引用 对话框若要显示的名称。 此名称还应是名称和相同返回通过调用 GetText

该环境只调用注册库的此方法全局浏览容器。

.NET Framework 安全性

请参见

参考

IVsLibrary 接口

Microsoft.VisualStudio.Shell.Interop 命名空间