IVsUIShellOpenDocument.OpenSpecificEditor Method

Opens a specified editor.

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

Syntax

'Declaration
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
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

  • grfOpenSpecific
    Type: UInt32

    [in] Values taken from the __VSOSPEFLAGS enumeration.

  • pszMkDocument
    Type: 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: Guid%

    [in] Unique identifier of the editor type.

  • pszPhysicalView
    Type: 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: Guid%

    [in] GUID identifying the logical view. For a list of logical view GUIDS, see Logical View and Physical View. 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: 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: UInt32

    [in] UI hierarchy item identifier for the specified editor. For more information see VSITEMID.

  • punkDocDataExisting
    Type: IntPtr

    [in] Pointer to the IUnknown interface.

Return Value

Type: 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

Microsoft.VisualStudio.Shell.Interop Namespace