Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Gets an object, cookie, and owning project type from the Running Document Table (RDT) for the document specified by the given path.
This API is not CLS-compliant.
Namespace: Microsoft.VisualStudio.Shell
Assemblies: Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
Syntax
'Declaration
<CLSCompliantAttribute(False)> _
Public Function FindDocument ( _
moniker As String, _
<OutAttribute> ByRef hierarchy As IVsHierarchy, _
<OutAttribute> ByRef itemid As UInteger, _
<OutAttribute> ByRef docCookie As UInteger _
) As Object
'Usage
Dim instance As RunningDocumentTable
Dim moniker As String
Dim hierarchy As IVsHierarchy
Dim itemid As UInteger
Dim docCookie As UInteger
Dim returnValue As Object
returnValue = instance.FindDocument(moniker, _
hierarchy, itemid, docCookie)
[CLSCompliantAttribute(false)]
public Object FindDocument(
string moniker,
out IVsHierarchy hierarchy,
out uint itemid,
out uint docCookie
)
[CLSCompliantAttribute(false)]
public:
Object^ FindDocument(
String^ moniker,
[OutAttribute] IVsHierarchy^% hierarchy,
[OutAttribute] unsigned int% itemid,
[OutAttribute] unsigned int% docCookie
)
[<CLSCompliantAttribute(false)>]
member FindDocument :
moniker:string *
hierarchy:IVsHierarchy byref *
itemid:uint32 byref *
docCookie:uint32 byref -> Object
public function FindDocument(
moniker : String,
hierarchy : IVsHierarchy,
itemid : uint,
docCookie : uint
) : Object
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.
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
- 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.