IVsHierarchyItemManager::TryGetHierarchyItem Method (IVsHierarchy^, UInt32, IVsHierarchyItem^)

 

Gets a cached IVsHierarchyItem representing the specified hierarchy and item identifier, if one has already been created.

Namespace:   Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.Immutable.11.0 (in Microsoft.VisualStudio.Shell.Immutable.11.0.dll)

bool TryGetHierarchyItem(
	IVsHierarchy^ hierarchy,
	unsigned int itemid,
	[OutAttribute] IVsHierarchyItem^% item
)

Parameters

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

The hierarchy from which to retrieve the hierarchy item.

itemid
Type: System::UInt32

The item identifier.

item
Type: Microsoft.VisualStudio.Shell::IVsHierarchyItem^

Returns the hierarchy item.

Return Value

Type: System::Boolean

true if the IVsHierarchyItem exists and was returned, otherwise false.

The returned IVsHierarchyItem can be used to get properties about the item and to visit its parent and child items.

Return to top
Show: