Gets a cookie from the Running Document Table (RDT) that represents the document specified by the given path.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Syntax
'宣言
Public Function FindDocument ( _
moniker As String, _
<OutAttribute> ByRef docCookie As UInteger _
) As Object
'使用
Dim instance As RunningDocumentTable
Dim moniker As String
Dim docCookie As UInteger
Dim returnValue As Object
returnValue = instance.FindDocument(moniker, _
docCookie)
public Object FindDocument(
string moniker,
out uint docCookie
)
public:
Object^ FindDocument(
String^ moniker,
[OutAttribute] unsigned int% docCookie
)
public function FindDocument(
moniker : String,
docCookie : uint
) : Object
Parameters
moniker
Type: System.String[in] Path to the desired document.
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), or a null reference (Nothing in Visual Basic) if 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.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.