IVsUIHierarchyWindow2::FindCommonSelectedHierarchy Method (UInt32, IVsUIHierarchy^)

 

Finds the lowermost hierarchy that is the nearest ancestor to every selected node.

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

int FindCommonSelectedHierarchy(
	unsigned int grfOpt,
	[OutAttribute] IVsUIHierarchy^% lppCommonUIH
)

Parameters

grfOpt
Type: System::UInt32

[in] Controls whether this method returns the Solution as the common hierarchy. For a list of grfOpt values, see __VSCOMHIEROPTIONS.

lppCommonUIH
Type: Microsoft.VisualStudio.Shell.Interop::IVsUIHierarchy^

[out, retval] Common IVsUIHierarchy interface for the selected hierarchy.

Return Value

Type: System::Int32

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

The UI hierarchy window contains a parent chain of hierarchies. If you select two or more nodes that reside in the same hierarchy, this method returns the parent of that hierarchy. Similarly, if you select nodes that reside in two different hierarchies, this method returns the parent of those two hierarchies.

Return to top
Show: