FileDocumentManager.OpenWithSpecific Method

Opens a file with a specific editor, specifying how it is to be opened, the physical and logical views to open it in, the existing document data, and which UI action should be taken on the window frame.

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

Syntax

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

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

Parameters

  • editorFlags
    Type: System.UInt32

    Flags describing how to open the file.

  • editorType
    Type: System.Guid%

    The GUID of the editor type to use.

  • 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%

    The GUID of the logical view.

  • docDataExisting
    Type: System.IntPtr

    Pointer to the existing document data object.

Return Value

Type: System.Int32

Returns S_OK if the file was opened; otherwise returns a failure code.

Remarks

For possible window frame show actions, see WindowFrameShowAction.

Logical views are defined by GUIDS such as LOGVIEWID_Any().

Editor type GUIDs are either GUID_DefaultEditor or GUID_ExternalEditor.

Permissions

See Also

Reference

FileDocumentManager Class

FileDocumentManager Members

Microsoft.VisualStudio.Package Namespace