Udostępnij za pośrednictwem


Metoda IVsProject3.ReopenItem — (UInt32, Guid, String, Guid, IntPtr, IVsWindowFrame)

 

Ponownie otwiera element w projekcie.

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

Składnia

int ReopenItem(
    uint itemid,
    [InAttribute] ref Guid rguidEditorType,
    string pszPhysicalView,
    [InAttribute] ref Guid rguidLogicalView,
    IntPtr punkDocDataExisting,
    out IVsWindowFrame ppWindowFrame
)
int ReopenItem(
    unsigned int itemid,
    [InAttribute] Guid% rguidEditorType,
    String^ pszPhysicalView,
    [InAttribute] Guid% rguidLogicalView,
    IntPtr punkDocDataExisting,
    [OutAttribute] IVsWindowFrame^% ppWindowFrame
)
abstract ReopenItem : 
        itemid:uint32 *
        rguidEditorType:Guid byref *
        pszPhysicalView:string *
        rguidLogicalView:Guid byref *
        punkDocDataExisting:nativeint *
        ppWindowFrame:IVsWindowFrame byref -> int
Function ReopenItem (
    itemid As UInteger,
    <InAttribute> ByRef rguidEditorType As Guid,
    pszPhysicalView As String,
    <InAttribute> ByRef rguidLogicalView As Guid,
    punkDocDataExisting As IntPtr,
    <OutAttribute> ByRef ppWindowFrame As IVsWindowFrame
) As Integer

Parametry

  • itemid
    Type: System.UInt32

    [in] Identyfikator elementu ponownie otwarte.

  • rguidEditorType
    Type: System.Guid

    [in] Unikatowy identyfikator typu edytora.

  • rguidLogicalView
    Type: System.Guid

    [in] Unikatowy identyfikator widoku logicznym. W MultiView przypadku określi widok ma być aktywowany.

  • punkDocDataExisting
    Type: System.IntPtr

    [in] Wskaźnik do 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.

Implementuje

IVsProject2.ReopenItem(UInt32, Guid, String, Guid, IntPtr, IVsWindowFrame)

Uwagi

Podpis COM

Z vsshell.idl:

HRESULT IVsProject3::ReopenItem(
   [in] VSITEMID itemid,
   [in] REFGUID rguidEditorType,
   [in] LPCOLESTR pszPhysicalView,
   [in] REFGUID rguidLogicalView,
   [in] IUnknown *punkDocDataExisting,
   [out, retval] IVsWindowFrame **ppWindowFrame
);

Podobnie jak OpenItem z tą różnicą, że wywołanie OpenSpecificEditor (a nie OpenStandardEditor).

Implementowanie ReopenItem do obsługi automatycznego ponownego otwarcia plików, które należą do projektu. Na przykład, gdy użytkownik dodaje pliki do projektu wpisz utworzone, zamyka projektu i później ponownie otwiera, implementować ReopenItem otwierać pliki, które należą do nowego typu projektu.

Zobacz też

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

Powrót do początku