IVsSimpleLibrary2.GetBrowseContainersForHierarchy 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回与给定的对应的浏览容器的数组 IVsHierarchy 。
int GetBrowseContainersForHierarchy(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & pHierarchy, unsigned int celt, std::Array <Microsoft::VisualStudio::Shell::Interop::VSBROWSECONTAINER> const & rgBrowseContainers, std::Array <unsigned int> const & pcActual);
public int GetBrowseContainersForHierarchy (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierarchy, uint celt, Microsoft.VisualStudio.Shell.Interop.VSBROWSECONTAINER[] rgBrowseContainers, uint[] pcActual);
abstract member GetBrowseContainersForHierarchy : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 * Microsoft.VisualStudio.Shell.Interop.VSBROWSECONTAINER[] * uint32[] -> int
Public Function GetBrowseContainersForHierarchy (pHierarchy As IVsHierarchy, celt As UInteger, rgBrowseContainers As VSBROWSECONTAINER(), Optional pcActual As UInteger()) As Integer
参数
- pHierarchy
- IVsHierarchy
中 IVsHierarchy 表示层次结构的对象。
- celt
- UInt32
中数组中元素的数目 rgBrowseContainers 。
- rgBrowseContainers
- VSBROWSECONTAINER[]
[in,out]对于输入,为 null 。 在输出上,为一组 VSBROWSECONTAINER 结构。
- pcActual
- UInt32[]
弄在中返回的容器的实际数目 rgBrowseContainers 。
返回
如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。
注解
COM 签名
从 vsshell80:
HRESULT IVsSimpleLibrary2::GetBrowseContainersForHierarchy(
[in] IVsHierarchy *pHierarchy,
[in] ULONG celt,
[in, out, size_is(celt)] VSBROWSECONTAINER rgBrowseContainers[],
[out, optional] ULONG *pcActual
);
环境调用此方法两次,以获取对应于给定项目层次结构的浏览容器的列表。 在第一次调用中,环境将 celt 和设置 rgBrowseContainers 为 null 。 此方法在参数中返回 pcActual 指向层次结构中的浏览容器的数目 pHierarchy 。 然后,环境分配 rgBrowseContainers 数组,并 GetBrowseContainersForHierarchy 再次调用。 在此调用中,方法将 rgBrowseContainers 用 VSBROWSECONTAINER 确定层次结构中的浏览容器的结构填充数组。 celt仅当你的包拥有请求的层次结构时,才在中返回计数。
此方法仅对提供项目浏览容器的库有意义。