Share via


IVsLibrary2.GetBrowseContainersForHierarchy Method

Definition

Returns an array of Browse Containers that correspond to the given 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

Parameters

pHierarchy
IVsHierarchy

[in] Pointer to an IVsHierarchy interface.

celt
UInt32

[in] The number of elements in the rgBrowseContainers array.

rgBrowseContainers
VSBROWSECONTAINER[]

[in, out] On input, null. On output, an array of VSBROWSECONTAINER structures.

pcActual
UInt32[]

[out] The actual number of containers returned in rgBrowseContainers.

Returns

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

Remarks

COM Signature

From vsshell80.idl:

HRESULT IVsLibrary2::GetBrowseContainersForHierarchy(  
   [in] IVsHierarchy *pHierarchy,   
   [in] ULONG celt,   
   [in, out, size_is(celt)] VSBROWSECONTAINER rgBrowseContainers[],   
   [out, optional] ULONG *pcActual  
);  

The environment calls this method twice to obtain a list of browse containers corresponding to a given project hierarchy. In the first call, the environment sets celt and rgBrowseContainers to null. This method returns in the pcActual parameter the number of browse containers in the hierarchy pointed to be pHierarchy. The environment then allocates the rgBrowseContainers array and calls GetBrowseContainersForHierarchy again. With this call, the method fills the rgBrowseContainers array with VSBROWSECONTAINER structures identifying the browse containers within your hierarchy. Return a count in celt only if your package owns the requested hierarchy.

This method is meaningful only for libraries providing project browse containers.

Applies to