Compartir a través de


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.

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

Syntax

'Declaración
Public Function FindDocument ( _
    moniker As String, _
    <OutAttribute> ByRef hierarchy As IVsHierarchy, _
    <OutAttribute> ByRef itemid As UInteger, _
    <OutAttribute> ByRef docCookie As UInteger _
) As Object
public Object FindDocument(
    string moniker,
    out IVsHierarchy hierarchy,
    out uint itemid,
    out uint docCookie
)

Parameters

  • 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.

Remarks

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.

.NET Framework Security

See Also

Reference

RunningDocumentTable Class

FindDocument Overload

Microsoft.VisualStudio.Shell Namespace