RunningDocumentTable::FindDocument Method (String^, IVsHierarchy^, UInt32, UInt32)
Gets an object, cookie, and owning project type from the Running Document Table (RDT) for the document specified by the given path.
Assembly: Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)
public: Object^ FindDocument( String^ moniker, [OutAttribute] IVsHierarchy^% hierarchy, [OutAttribute] unsigned int% itemid, [OutAttribute] unsigned int% docCookie )
Parameters
- moniker
-
Type:
System::String^
[in] Path to the desired document.
- hierarchy
-
Type:
Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^
[out] Returns an IVsHierarchy object that represents the project that owns the requested document.
- itemid
-
Type:
System::UInt32
[out] Returns the ID of the document in the IVsHierarchy object.
- docCookie
-
Type:
System::UInt32
[out] Returns the unique value that represents the requested document in the RDT.
Return Value
Type: System::Object^An object that can be cast to an appropriate interface to access the document (see Remarks for details). If a null value is returned, the document is not registered with Visual Studio.
The cookie can be used in a call to the GetRunningDocumentContents method.
The object returned can typically be cast to the IVsPersistDocData interface or the IVsDocDataFileChangeControl interface.