Freigeben über


RunningDocumentTable.GetHierarchyItem(String) Method

Definition

Gets the project that owns the specified document.

public:
 Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ GetHierarchyItem(System::String ^ moniker);
public:
 Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ GetHierarchyItem(Platform::String ^ moniker);
Microsoft::VisualStudio::Shell::Interop::IVsHierarchy GetHierarchyItem(std::wstring const & moniker);
public Microsoft.VisualStudio.Shell.Interop.IVsHierarchy GetHierarchyItem (string moniker);
member this.GetHierarchyItem : string -> Microsoft.VisualStudio.Shell.Interop.IVsHierarchy
Public Function GetHierarchyItem (moniker As String) As IVsHierarchy

Parameters

moniker
String

[in] Path to the desired document.

Returns

IVsHierarchy, otherwise null.

Remarks

If this method returns null, 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.

Applies to