다음을 통해 공유


IVsRunningDocumentTable.GetDocumentInfo Method

Returns information about a document registered in the RDT, given the cookie.

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

Syntax

‘선언
Function GetDocumentInfo ( _
    docCookie As UInteger, _
    <OutAttribute> ByRef pgrfRDTFlags As UInteger, _
    <OutAttribute> ByRef pdwReadLocks As UInteger, _
    <OutAttribute> ByRef pdwEditLocks As UInteger, _
    <OutAttribute> ByRef pbstrMkDocument As String, _
    <OutAttribute> ByRef ppHier As IVsHierarchy, _
    <OutAttribute> ByRef pitemid As UInteger, _
    <OutAttribute> ByRef ppunkDocData As IntPtr _
) As Integer
‘사용 방법
Dim instance As IVsRunningDocumentTable
Dim docCookie As UInteger
Dim pgrfRDTFlags As UInteger
Dim pdwReadLocks As UInteger
Dim pdwEditLocks As UInteger
Dim pbstrMkDocument As String
Dim ppHier As IVsHierarchy
Dim pitemid As UInteger
Dim ppunkDocData As IntPtr
Dim returnValue As Integer

returnValue = instance.GetDocumentInfo(docCookie, _
    pgrfRDTFlags, pdwReadLocks, pdwEditLocks, _
    pbstrMkDocument, ppHier, pitemid, _
    ppunkDocData)
int GetDocumentInfo(
    uint docCookie,
    out uint pgrfRDTFlags,
    out uint pdwReadLocks,
    out uint pdwEditLocks,
    out string pbstrMkDocument,
    out IVsHierarchy ppHier,
    out uint pitemid,
    out IntPtr ppunkDocData
)
int GetDocumentInfo(
    [InAttribute] 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
)
function GetDocumentInfo(
    docCookie : uint, 
    pgrfRDTFlags : uint, 
    pdwReadLocks : uint, 
    pdwEditLocks : uint, 
    pbstrMkDocument : String, 
    ppHier : IVsHierarchy, 
    pitemid : uint, 
    ppunkDocData : IntPtr
) : int

Parameters

  • docCookie
    Type: System.UInt32

    [in] Abstract value representing the document for which information was requested.

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

Return Value

Type: System.Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

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.

Permissions

See Also

Reference

IVsRunningDocumentTable Interface

IVsRunningDocumentTable Members

Microsoft.VisualStudio.Shell.Interop Namespace