IVsUIHierarchyWindow.FindCommonSelectedHierarchy Method
Finds the lowermost hierarchy that is the nearest ancestor to every selected node.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function FindCommonSelectedHierarchy ( _
grfOpt As UInteger, _
<OutAttribute> ByRef lppCommonUIH As IVsUIHierarchy _
) As Integer
int FindCommonSelectedHierarchy(
uint grfOpt,
out IVsUIHierarchy lppCommonUIH
)
int FindCommonSelectedHierarchy(
[InAttribute] unsigned int grfOpt,
[OutAttribute] IVsUIHierarchy^% lppCommonUIH
)
abstract FindCommonSelectedHierarchy :
grfOpt:uint32 *
lppCommonUIH:IVsUIHierarchy byref -> int
function FindCommonSelectedHierarchy(
grfOpt : uint,
lppCommonUIH : IVsUIHierarchy
) : int
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.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsUIHierarchyWindow::FindCommonSelectedHierarchy(
[in] VSCOMHIEROPTIONS grfOpt,
[out, retval] IVsUIHierarchy** lppCommonUIH
);
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.