Partager via


IVsUIHierarchyWindow2.FindCommonSelectedHierarchy Method

Definition

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

public:
 int FindCommonSelectedHierarchy(System::UInt32 grfOpt, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsUIHierarchy ^ % lppCommonUIH);
public:
 int FindCommonSelectedHierarchy(unsigned int grfOpt, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsUIHierarchy ^ &  lppCommonUIH);
int FindCommonSelectedHierarchy(unsigned int grfOpt, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsUIHierarchy const & & lppCommonUIH);
public int FindCommonSelectedHierarchy (uint grfOpt, out Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy lppCommonUIH);
abstract member FindCommonSelectedHierarchy : uint32 * IVsUIHierarchy -> int
Public Function FindCommonSelectedHierarchy (grfOpt As UInteger, ByRef lppCommonUIH As IVsUIHierarchy) As Integer

Parameters

grfOpt
UInt32

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

lppCommonUIH
IVsUIHierarchy

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

Returns

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

Implements

Remarks

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.

Applies to