IVsRunningDocumentTable::GetDocumentInfo Method (UInt32, UInt32, UInt32, UInt32, String^, IVsHierarchy^, UInt32, IntPtr)
Returns information about a document registered in the RDT, given the cookie.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
int GetDocumentInfo( unsigned int docCookie, [OutAttribute] unsigned int% pgrfRDTFlags, [OutAttribute] unsigned int% pdwReadLocks, [OutAttribute] unsigned int% pdwEditLocks, [OutAttribute] String^% pbstrMkDocument, [OutAttribute] IVsHierarchy^% ppHier, [OutAttribute] unsigned int% pitemid, [OutAttribute] IntPtr% ppunkDocData )
Parameters
- docCookie
-
Type:
System::UInt32
[in] Abstract value representing the document for which information was requested.
- pgrfRDTFlags
-
Type:
System::UInt32
[out] Returns flags whose values are taken from the _VSRDTFLAGS enumeration.
- pdwReadLocks
-
Type:
System::UInt32
[out] Returns the number of read locks on the document.
- pdwEditLocks
-
Type:
System::UInt32
[out] Returns the number of edit locks on the document.
- pbstrMkDocument
-
Type:
System::String^
[out] Returns the path and file name of the document.
- ppHier
-
Type:
Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^
[out, optional] Returns the IVsHierarchy interface.
- pitemid
-
Type:
System::UInt32
[out, optional] Item identifier of the document. This is a unique identifier or it can be one of the following values: VSITEMID_NIL, VSITEMID_ROOT, or VSITEMID_SELECTION.
- ppunkDocData
-
Type:
System::IntPtr
[out, optional] Returns an IUnknown interface.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From vsshell.idl:
HRESULT IVsRunningDocumentTable::GetDocumentInfo(
[in] VSCOOKIE docCookie,
[out] VSRDTFLAGS *pgrfRDTFlags,
[out] DWORD *pdwReadLocks,
[out] DWORD *pdwEditLocks,
[out] BSTR *pbstrMkDocument,
[out] IVsHierarchy **ppHier,
[out] VSITEMID *pitemid,
[out] IUnknown **ppunkDocData
);
The ppunkDocData parameter represents the document data object associated with the registered document. Typically, the IVsPersistDocData and IVsDocDataFileChangeControl interfaces are obtained from this IUnknown object.