RunningDocumentTable.GetHierarchyItem Method

Gets the project that owns the specified document.

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

Syntax

'宣言
Public Function GetHierarchyItem ( _
    moniker As String _
) As IVsHierarchy
'使用
Dim instance As RunningDocumentTable
Dim moniker As String
Dim returnValue As IVsHierarchy

returnValue = instance.GetHierarchyItem(moniker)
public IVsHierarchy GetHierarchyItem(
    string moniker
)
public:
IVsHierarchy^ GetHierarchyItem(
    String^ moniker
)
public function GetHierarchyItem(
    moniker : String
) : IVsHierarchy

Parameters

Return Value

Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchy

IVsHierarchy, otherwise a null reference (Nothing in Visual Basic).

Remarks

If this method returns a null reference (Nothing in Visual Basic), then no project owns the specified document. Note that this method does not return the item ID of the document within the project, just the IVsHierarchy object that represents the project. To obtain the item ID of the document, call either the FindDocument(String, IVsHierarchy%, UInt32%, UInt32%) method or the ParseCanonicalName method.

Permissions

See Also

Reference

RunningDocumentTable Class

RunningDocumentTable Members

Microsoft.VisualStudio.Shell Namespace