IVsProject3::ReopenItem Method (UInt32, Guid, String^, Guid, IntPtr, IVsWindowFrame^)

 

Reopens an item in the project.

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

int ReopenItem(
	unsigned int itemid,
	[InAttribute] Guid% rguidEditorType,
	String^ pszPhysicalView,
	[InAttribute] Guid% rguidLogicalView,
	IntPtr punkDocDataExisting,
	[OutAttribute] IVsWindowFrame^% ppWindowFrame
)

Parameters

itemid
Type: System::UInt32

[in] Identifier of the item reopened.

rguidEditorType
Type: System::Guid

[in] Unique identifier of the editor type.

pszPhysicalView
Type: System::String^

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

rguidLogicalView
Type: System::Guid

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

punkDocDataExisting
Type: System::IntPtr

[in] Pointer to the IUnknown interface.

ppWindowFrame
Type: Microsoft.VisualStudio.Shell.Interop::IVsWindowFrame^

[out, retval] Pointer to the IVsWindowFrame interface.

Return Value

Type: System::Int32

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

From vsshell.idl:

HRESULT IVsProject3::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.

Return to top
Show: