Sdílet prostřednictvím


IVsProject2.ReopenItem Method

Definition

Reopens an item in the project.

public:
 int ReopenItem(System::UInt32 itemid, Guid % rguidEditorType, System::String ^ pszPhysicalView, Guid % rguidLogicalView, IntPtr punkDocDataExisting, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsWindowFrame ^ % ppWindowFrame);
public int ReopenItem (uint itemid, ref Guid rguidEditorType, string pszPhysicalView, ref Guid rguidLogicalView, IntPtr punkDocDataExisting, out Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame ppWindowFrame);
abstract member ReopenItem : uint32 * Guid * string * Guid * nativeint * IVsWindowFrame -> int
Public Function ReopenItem (itemid As UInteger, ByRef rguidEditorType As Guid, pszPhysicalView As String, ByRef rguidLogicalView As Guid, punkDocDataExisting As IntPtr, ByRef ppWindowFrame As IVsWindowFrame) As Integer

Parameters

itemid
UInt32

[in] Identifier of the item reopened.

rguidEditorType
Guid

[in] Unique identifier of the editor type.

pszPhysicalView
String

[in] Name of the physical view. If set to null, MapLogicalView(Guid, String) will be called.

rguidLogicalView
Guid

[in] Unique identifier of the logical view. In MultiView, the case will determine the view to be activated.

punkDocDataExisting
IntPtr

nativeint

[in] Pointer to the IUnknown interface.

ppWindowFrame
IVsWindowFrame

[out, retval] Pointer to the IVsWindowFrame interface.

Returns

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

Remarks

COM Signature

From vsshell.idl:

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

Similar to OpenItem except that you call OpenSpecificEditor (rather than the OpenStandardEditor).

Implement ReopenItem to handle automatic reopening of files that belong to a project. For example, when a user adds files to a project type that you created, closes the project and later reopens it, implement ReopenItem to also open the files that belong to the new project type.

Applies to