Partager via


VsShellUtilities.OpenDocument Method (IServiceProvider, String, Guid, IVsUIHierarchy%, UInt32%, IVsWindowFrame%, IVsTextView%)

Opens the specified document in the specified logical view.

Namespace:  Microsoft.VisualStudio.Shell
Assemblies:   Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)

Syntax

'Déclaration
Public Shared Sub OpenDocument ( _
    provider As IServiceProvider, _
    fullPath As String, _
    logicalView As Guid, _
    <OutAttribute> ByRef hierarchy As IVsUIHierarchy, _
    <OutAttribute> ByRef itemID As UInteger, _
    <OutAttribute> ByRef windowFrame As IVsWindowFrame, _
    <OutAttribute> ByRef view As IVsTextView _
)
'Utilisation
Dim provider As IServiceProvider
Dim fullPath As String
Dim logicalView As Guid
Dim hierarchy As IVsUIHierarchy
Dim itemID As UInteger
Dim windowFrame As IVsWindowFrame
Dim view As IVsTextView

VsShellUtilities.OpenDocument(provider, fullPath, _
    logicalView, hierarchy, itemID, windowFrame, _
    view)
public static void OpenDocument(
    IServiceProvider provider,
    string fullPath,
    Guid logicalView,
    out IVsUIHierarchy hierarchy,
    out uint itemID,
    out IVsWindowFrame windowFrame,
    out IVsTextView view
)
public:
static void OpenDocument(
    IServiceProvider^ provider, 
    String^ fullPath, 
    Guid logicalView, 
    [OutAttribute] IVsUIHierarchy^% hierarchy, 
    [OutAttribute] unsigned int% itemID, 
    [OutAttribute] IVsWindowFrame^% windowFrame, 
    [OutAttribute] IVsTextView^% view
)
static member OpenDocument : 
        provider:IServiceProvider * 
        fullPath:string * 
        logicalView:Guid * 
        hierarchy:IVsUIHierarchy byref * 
        itemID:uint32 byref * 
        windowFrame:IVsWindowFrame byref * 
        view:IVsTextView byref -> unit 
public static function OpenDocument(
    provider : IServiceProvider, 
    fullPath : String, 
    logicalView : Guid, 
    hierarchy : IVsUIHierarchy, 
    itemID : uint, 
    windowFrame : IVsWindowFrame, 
    view : IVsTextView
)

Parameters

  • fullPath
    Type: System.String
    The absolute path of the document.
  • logicalView
    Type: System.Guid
    The GUID of the logical view in which to open the document.

.NET Framework Security

See Also

Reference

VsShellUtilities Class

VsShellUtilities Members

OpenDocument Overload

Microsoft.VisualStudio.Shell Namespace