When overridden in a derived class, opens a document using the standard editor.
Namespace: Microsoft.VisualStudio.Package
Assembly: MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)
Syntax
'宣言
Public Overridable Function Open ( _
ByRef logicalView As Guid, _
docDataExisting As IntPtr, _
<OutAttribute> ByRef windowFrame As IVsWindowFrame, _
windowFrameAction As WindowFrameShowAction _
) As Integer
'使用
Dim instance As DocumentManager
Dim logicalView As Guid
Dim docDataExisting As IntPtr
Dim windowFrame As IVsWindowFrame
Dim windowFrameAction As WindowFrameShowAction
Dim returnValue As Integer
returnValue = instance.Open(logicalView, _
docDataExisting, windowFrame, windowFrameAction)
public virtual int Open(
ref Guid logicalView,
IntPtr docDataExisting,
out IVsWindowFrame windowFrame,
WindowFrameShowAction windowFrameAction
)
public:
virtual int Open(
Guid% logicalView,
IntPtr docDataExisting,
[OutAttribute] IVsWindowFrame^% windowFrame,
WindowFrameShowAction windowFrameAction
)
public function Open(
logicalView : Guid,
docDataExisting : IntPtr,
windowFrame : IVsWindowFrame,
windowFrameAction : WindowFrameShowAction
) : int
Parameters
logicalView
Type: System.Guid%The GUID of the view to be opened.
docDataExisting
Type: System.IntPtrPointer to the existing document data object.
windowFrame
Type: Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame%The window frame corresponding to the file.
windowFrameAction
Type: Microsoft.VisualStudio.Package.WindowFrameShowActionWindowFrameShowAction that should be taken on the document window.
Return Value
Type: System.Int32
The HRESULT corresponding to the success or failure of the action.
Remarks
Because the [DocumentManager] class does not handle specific file types, [Open] throws a [System.NotImplementedException] by default.
Notes to Implementers:
For an implementation of this method, see both [M:Microsoft.VisualStudio.Package.FileDocument.Manager.Open(ref System.Guid logicalView, System.IntPtr docDataExisting, out T:Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame windowFrame, T:Microsoft.Visualstudio.Package.WindowFrameShowAction windowFrameAction)] and the helper method [M:Microsoft.VisualStudio.Package.FileDocumentManager.Open(bool newFile, bool openWith, uint editorFlags, ref System.Guid editorType, string physicalView, ref System.Guid logicalView, System.IntPtr docDataExisting, out T:Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame windowFrame, T:Microsoft.VisualStudio.Package.WindowFrameShowAction windowFrameAction]).
Permissions
- 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.