Udostępnij za pośrednictwem


Metoda IVsRunningDocumentTable.GetDocumentInfo — (UInt32, UInt32, UInt32, UInt32, String, IVsHierarchy, UInt32, IntPtr)

 

Zwraca informacje o dokumencie zarejestrowanie Normalizacją, biorąc pod uwagę plik cookie.

Przestrzeń nazw:   Microsoft.VisualStudio.Shell.Interop
Zestaw:  Microsoft.VisualStudio.Shell.Interop (w Microsoft.VisualStudio.Shell.Interop.dll)

Składnia

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(
    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
)
abstract GetDocumentInfo : 
        docCookie:uint32 *
        pgrfRDTFlags:uint32 byref *
        pdwReadLocks:uint32 byref *
        pdwEditLocks:uint32 byref *
        pbstrMkDocument:string byref *
        ppHier:IVsHierarchy byref *
        pitemid:uint32 byref *
        ppunkDocData:nativeint byref -> int
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

Parametry

  • docCookie
    Type: System.UInt32

    [in] Ogólna wartość reprezentująca dokumentu, dla którego zażądano informacji.

  • pgrfRDTFlags
    Type: System.UInt32

    [out] Zwraca wartość flagi, których wartości są pobierane z _VSRDTFLAGS wyliczenia.

  • pdwReadLocks
    Type: System.UInt32

    [out] Zwraca liczbę blokady odczytu dokumentu.

  • pdwEditLocks
    Type: System.UInt32

    [out] Zwraca liczbę blokad edycji dokumentu.

  • pbstrMkDocument
    Type: System.String

    [out] Zwraca ścieżkę i nazwę dokumentu.

  • ppunkDocData
    Type: System.IntPtr

    [out, opcjonalny] Zwraca IUnknown interfejsu.

Wartość zwracana

Type: System.Int32

Jeśli metoda zakończy się pomyślnie, zwraca S_OK. Jeśli nie, zwraca kod błędu.

Uwagi

Podpis COM

Z 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
);

ppunkDocData Parametr reprezentuje obiekt danych dokumentu skojarzone z dokumentem zarejestrowane. Zazwyczaj IVsPersistDocData i IVsDocDataFileChangeControl interfejsy są uzyskiwane z tego IUnknown obiektu.

Zobacz też

Interfejs IVsRunningDocumentTable
Przestrzeń nazw Microsoft.VisualStudio.Shell.Interop

Powrót do początku