DocumentManager.OpenWithSpecific Method

When overridden in a derived class, opens a document using the given editor.

Namespace:  Microsoft.VisualStudio.Package
Assembly:  MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)

Syntax

'宣言
Public Overridable Function OpenWithSpecific ( _
    editorFlags As UInteger, _
    ByRef editorType As Guid, _
    physicalView As String, _
    ByRef logicalView As Guid, _
    docDataExisting As IntPtr, _
    <OutAttribute> ByRef frame As IVsWindowFrame, _
    windowFrameAction As WindowFrameShowAction _
) As Integer
'使用
Dim instance As DocumentManager
Dim editorFlags As UInteger
Dim editorType As Guid
Dim physicalView As String
Dim logicalView As Guid
Dim docDataExisting As IntPtr
Dim frame As IVsWindowFrame
Dim windowFrameAction As WindowFrameShowAction
Dim returnValue As Integer

returnValue = instance.OpenWithSpecific(editorFlags, _
    editorType, physicalView, logicalView, _
    docDataExisting, frame, windowFrameAction)
public virtual int OpenWithSpecific(
    uint editorFlags,
    ref Guid editorType,
    string physicalView,
    ref Guid logicalView,
    IntPtr docDataExisting,
    out IVsWindowFrame frame,
    WindowFrameShowAction windowFrameAction
)
public:
virtual int OpenWithSpecific(
    unsigned int editorFlags, 
    Guid% editorType, 
    String^ physicalView, 
    Guid% logicalView, 
    IntPtr docDataExisting, 
    [OutAttribute] IVsWindowFrame^% frame, 
    WindowFrameShowAction windowFrameAction
)
public function OpenWithSpecific(
    editorFlags : uint, 
    editorType : Guid, 
    physicalView : String, 
    logicalView : Guid, 
    docDataExisting : IntPtr, 
    frame : IVsWindowFrame, 
    windowFrameAction : WindowFrameShowAction
) : int

Parameters

  • editorFlags
    Type: System.UInt32

    Flags specifying which action to take when opening the editor.

  • editorType
    Type: System.Guid%

    GUID of the editor type.

  • physicalView
    Type: System.String

    Name of the physical view. If null, the right physical view will be decided by the editor factory.

  • logicalView
    Type: System.Guid%

    GUID of the view to be opened.

  • docDataExisting
    Type: System.IntPtr

    Pointer to the existing document data object.

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.FileDocumentManager.OpenWithSpecific(uint editorFlags, ref System.Guid editorType, string physicalView, ref System.Guid logicalView, System.IntPtr docDataExisting, out T:Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame frame, 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

See Also

Reference

DocumentManager Class

DocumentManager Members

Microsoft.VisualStudio.Package Namespace