다음을 통해 공유


RunningDocumentTable.GetHierarchyItem Method

Gets the project that owns the specified document.

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

Syntax

'Declaration
Public Function GetHierarchyItem ( _
    moniker As String _
) As IVsHierarchy
public IVsHierarchy GetHierarchyItem(
    string moniker
)
public:
IVsHierarchy^ GetHierarchyItem(
    String^ moniker
)
member GetHierarchyItem : 
        moniker:string -> IVsHierarchy
public function GetHierarchyItem(
    moniker : String
) : IVsHierarchy

Parameters

  • moniker
    Type: String

    [in] Path to the desired document.

Return Value

Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchy
IVsHierarchy , otherwise nulla null reference (Nothing in Visual Basic).

Remarks

If this method returns nulla 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 method or the ParseCanonicalName method.

.NET Framework Security

See Also

Reference

RunningDocumentTable Class

Microsoft.VisualStudio.Shell Namespace