다음을 통해 공유


IVsUIShellOpenDocument.OpenSpecificEditor Method

Opens a specified editor.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

‘선언
Function OpenSpecificEditor ( _
    grfOpenSpecific As UInteger, _
    pszMkDocument As String, _
    ByRef rguidEditorType As Guid, _
    pszPhysicalView As String, _
    ByRef rguidLogicalView As Guid, _
    pszOwnerCaption As String, _
    pHier As IVsUIHierarchy, _
    itemid As UInteger, _
    punkDocDataExisting As IntPtr, _
    pSPHierContext As IServiceProvider, _
    <OutAttribute> ByRef ppWindowFrame As IVsWindowFrame _
) As Integer
‘사용 방법
Dim instance As IVsUIShellOpenDocument
Dim grfOpenSpecific As UInteger
Dim pszMkDocument As String
Dim rguidEditorType As Guid
Dim pszPhysicalView As String
Dim rguidLogicalView As Guid
Dim pszOwnerCaption As String
Dim pHier As IVsUIHierarchy
Dim itemid As UInteger
Dim punkDocDataExisting As IntPtr
Dim pSPHierContext As IServiceProvider
Dim ppWindowFrame As IVsWindowFrame
Dim returnValue As Integer

returnValue = instance.OpenSpecificEditor(grfOpenSpecific, _
    pszMkDocument, rguidEditorType, _
    pszPhysicalView, rguidLogicalView, _
    pszOwnerCaption, pHier, itemid, punkDocDataExisting, _
    pSPHierContext, ppWindowFrame)
int OpenSpecificEditor(
    uint grfOpenSpecific,
    string pszMkDocument,
    ref Guid rguidEditorType,
    string pszPhysicalView,
    ref Guid rguidLogicalView,
    string pszOwnerCaption,
    IVsUIHierarchy pHier,
    uint itemid,
    IntPtr punkDocDataExisting,
    IServiceProvider pSPHierContext,
    out IVsWindowFrame ppWindowFrame
)
int OpenSpecificEditor(
    [InAttribute] unsigned int grfOpenSpecific, 
    [InAttribute] String^ pszMkDocument, 
    [InAttribute] Guid% rguidEditorType, 
    [InAttribute] String^ pszPhysicalView, 
    [InAttribute] Guid% rguidLogicalView, 
    [InAttribute] String^ pszOwnerCaption, 
    [InAttribute] IVsUIHierarchy^ pHier, 
    [InAttribute] unsigned int itemid, 
    [InAttribute] IntPtr punkDocDataExisting, 
    [InAttribute] IServiceProvider^ pSPHierContext, 
    [OutAttribute] IVsWindowFrame^% ppWindowFrame
)
abstract OpenSpecificEditor : 
        grfOpenSpecific:uint32 * 
        pszMkDocument:string * 
        rguidEditorType:Guid byref * 
        pszPhysicalView:string * 
        rguidLogicalView:Guid byref * 
        pszOwnerCaption:string * 
        pHier:IVsUIHierarchy * 
        itemid:uint32 * 
        punkDocDataExisting:IntPtr * 
        pSPHierContext:IServiceProvider * 
        ppWindowFrame:IVsWindowFrame byref -> int 
function OpenSpecificEditor(
    grfOpenSpecific : uint, 
    pszMkDocument : String, 
    rguidEditorType : Guid, 
    pszPhysicalView : String, 
    rguidLogicalView : Guid, 
    pszOwnerCaption : String, 
    pHier : IVsUIHierarchy, 
    itemid : uint, 
    punkDocDataExisting : IntPtr, 
    pSPHierContext : IServiceProvider, 
    ppWindowFrame : IVsWindowFrame
) : int

Parameters

  • pszMkDocument
    Type: System.String
    [in] String form of the unique moniker identifier of the document in the project system, for example, the full path to the file. In non-file cases, this identifier is often in the form of a URL.
  • rguidEditorType
    Type: System.Guid%
    [in] Unique identifier of the editor type.
  • pszPhysicalView
    Type: System.String
    [in] Name of the physical view. If nulla null reference (Nothing in Visual Basic), the environment calls MapLogicalView on the editor factory to determine the physical view that corresponds to the logical view. In this case, nulla null reference (Nothing in Visual Basic) does not specify the primary view, but rather indicates that you do not know which view corresponds to the logical view.
  • rguidLogicalView
    Type: System.Guid%
    [in] GUID identifying the logical view. For a list of logical view GUIDS, see Single and Multi-tab Views. If you implement IVsMultiViewDocumentView on your document view object, then the value passed into the rguidLogicalView parameter determines which view is activated when the editor window is shown when the editor is instantiated. By specifying the logical view GUID, the caller of InitializeEditorInstance can request the specific view that matches the reason the caller is requesting the view. For example, the caller would specify LOGVIEWID_Debugging to get the view appropriate for debugging view, or LOGVIEWID_TextView to get the view appropriate for the text editor (that is, a view that implements IVsCodeWindow).
  • pszOwnerCaption
    Type: System.String
    [in] Initial caption defined by the document owner (that is, the project) for the document window. This is often of the form: "ProjectName – ItemName."
  • itemid
    Type: System.UInt32
    [in] UI hierarchy item identifier for the specified editor. For more information see VSITEMID.
  • punkDocDataExisting
    Type: System.IntPtr
    [in] Pointer to the IUnknown interface.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsUIShellOpenDocument::OpenSpecificEditor(
   [in] VSOSPEFLAGS grfOpenSpecific,
   [in] LPCOLESTR pszMkDocument,
   [in] REFGUID rguidEditorType,
   [in] LPCOLESTR pszPhysicalView,
   [in] REFGUID rguidLogicalView,
   [in] LPCOLESTR pszOwnerCaption,
   [in] IVsUIHierarchy *pHier,
   [in] VSITEMID itemid,
   [in] IUnknown *punkDocDataExisting,
   [in] IServiceProvider *pSPHierContext,
   [out, retval] IVsWindowFrame **ppWindowFrame
);

.NET Framework Security

See Also

Reference

IVsUIShellOpenDocument Interface

IVsUIShellOpenDocument Members

Microsoft.VisualStudio.Shell.Interop Namespace