IVsLibrary.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 签名
从 vsshell:
HRESULT IVsLibrary::GetBrowseContainersForHierarchy(
[in] IVsHierarchy *pHierarchy,
[in] ULONG celt,
[in, out, size_is(celt)] VSBROWSECONTAINER rgBrowseContainers[],
[out, optional] ULONG *pcActual
);
环境调用此方法两次,以获取对应于给定项目层次结构的浏览容器的列表。 在第一次调用中,环境会将 celt 和设置 rgBrowseContainers 为 null 。 返回 pcActual 层次结构中指向的浏览容器的数目 pHierarchy 。 然后,环境分配 rgBrowseContainers 数组,并 GetBrowseContainerForHierarchy 再次调用。 通过此调用, rgBrowseContainers 用 VSBROWSECONTAINER 确定层次结构中的浏览容器的结构填充数组。 celt仅当你的包拥有请求的层次结构时,才在中返回计数。 此方法仅对提供项目浏览容器的库有意义。