IVsLibrary::GetBrowseContainersForHierarchy Method (IVsHierarchy^, UInt32, array<VSBROWSECONTAINER>^, array<UInt32>^)

 

Returns an array of Browse Containers that correspond to the given IVsHierarchy.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

int GetBrowseContainersForHierarchy(
	IVsHierarchy^ pHierarchy,
	unsigned int celt,
	array<VSBROWSECONTAINER>^ rgBrowseContainers,
	array<unsigned int>^ pcActual
)

Parameters

pHierarchy
Type: Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^

[in] Pointer to an IVsHierarchy interface.

celt
Type: System::UInt32

[in] Count of elements rgBrowseContainers array.

rgBrowseContainers
Type: array<Microsoft.VisualStudio.Shell.Interop::VSBROWSECONTAINER>^

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

pcActual
Type: array<System::UInt32>^

[out] Pointer to a count of containers to be returned in rgBrowseContainers.

Return Value

Type: System::Int32

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

From vsshell.idl:

HRESULT IVsLibrary::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 will set celt and rgBrowseContainers to null. Return in pcActual the number of browse containers in the hierarchy pointed to be pHierarchy. The environment then allocates the rgBrowseContainers array and calls GetBrowseContainerForHierarchy again. With this call, fill the rgBrowseContainers array with VSBROWSECONTAINER structs 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.

Return to top
Show: