IVsProject2.ReopenItem Method
Reopens an item in the project.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function ReopenItem ( _
itemid As UInteger, _
ByRef rguidEditorType As Guid, _
pszPhysicalView As String, _
ByRef rguidLogicalView As Guid, _
punkDocDataExisting As IntPtr, _
<OutAttribute> ByRef ppWindowFrame As IVsWindowFrame _
) As Integer
int ReopenItem(
uint itemid,
ref Guid rguidEditorType,
string pszPhysicalView,
ref Guid rguidLogicalView,
IntPtr punkDocDataExisting,
out IVsWindowFrame ppWindowFrame
)
int ReopenItem(
[InAttribute] unsigned int itemid,
[InAttribute] Guid% rguidEditorType,
[InAttribute] String^ pszPhysicalView,
[InAttribute] Guid% rguidLogicalView,
[InAttribute] IntPtr punkDocDataExisting,
[OutAttribute] IVsWindowFrame^% ppWindowFrame
)
abstract ReopenItem :
itemid:uint32 *
rguidEditorType:Guid byref *
pszPhysicalView:string *
rguidLogicalView:Guid byref *
punkDocDataExisting:IntPtr *
ppWindowFrame:IVsWindowFrame byref -> int
function ReopenItem(
itemid : uint,
rguidEditorType : Guid,
pszPhysicalView : String,
rguidLogicalView : Guid,
punkDocDataExisting : IntPtr,
ppWindowFrame : IVsWindowFrame
) : int
Parameters
itemid
Type: UInt32[in] Identifier of the item reopened.
rguidEditorType
Type: Guid%[in] Unique identifier of the editor type.
pszPhysicalView
Type: String[in] Name of the physical view. If set to nulla null reference (Nothing in Visual Basic), MapLogicalView will be called.
rguidLogicalView
Type: Guid%[in] Unique identifier of the logical view. In MultiView, the case will determine the view to be activated.
punkDocDataExisting
Type: IntPtr[in] Pointer to the IUnknown interface.
ppWindowFrame
Type: Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame%[out, retval] Pointer to the IVsWindowFrame interface.
Return Value
Type: Int32
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.