Compartir a través de


IVsUIShellOpenDocument.OpenStandardEditor Method

Opens the standard editor.

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

Syntax

'Declaration
Function OpenStandardEditor ( _
    grfOpenStandard As UInteger, _
    pszMkDocument As String, _
    ByRef rguidLogicalView As Guid, _
    pszOwnerCaption As String, _
    pHier As IVsUIHierarchy, _
    itemid As UInteger, _
    punkDocDataExisting As IntPtr, _
    psp As IServiceProvider, _
    <OutAttribute> ByRef ppWindowFrame As IVsWindowFrame _
) As Integer
int OpenStandardEditor(
    uint grfOpenStandard,
    string pszMkDocument,
    ref Guid rguidLogicalView,
    string pszOwnerCaption,
    IVsUIHierarchy pHier,
    uint itemid,
    IntPtr punkDocDataExisting,
    IServiceProvider psp,
    out IVsWindowFrame ppWindowFrame
)
int OpenStandardEditor(
    [InAttribute] unsigned int grfOpenStandard, 
    [InAttribute] String^ pszMkDocument, 
    [InAttribute] Guid% rguidLogicalView, 
    [InAttribute] String^ pszOwnerCaption, 
    [InAttribute] IVsUIHierarchy^ pHier, 
    [InAttribute] unsigned int itemid, 
    [InAttribute] IntPtr punkDocDataExisting, 
    [InAttribute] IServiceProvider^ psp, 
    [OutAttribute] IVsWindowFrame^% ppWindowFrame
)
abstract OpenStandardEditor : 
        grfOpenStandard:uint32 * 
        pszMkDocument:string * 
        rguidLogicalView:Guid byref * 
        pszOwnerCaption:string * 
        pHier:IVsUIHierarchy * 
        itemid:uint32 * 
        punkDocDataExisting:IntPtr * 
        psp:IServiceProvider * 
        ppWindowFrame:IVsWindowFrame byref -> int
function OpenStandardEditor(
    grfOpenStandard : uint, 
    pszMkDocument : String, 
    rguidLogicalView : Guid, 
    pszOwnerCaption : String, 
    pHier : IVsUIHierarchy, 
    itemid : uint, 
    punkDocDataExisting : IntPtr, 
    psp : IServiceProvider, 
    ppWindowFrame : IVsWindowFrame
) : int

Parameters

  • grfOpenStandard
    Type: UInt32

    [in] Flags whose values are taken from the __VSOSEFLAGS 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.

  • rguidLogicalView
    Type: Guid%

    [in] GUID identifying the logical view. If the editor implements IVsMultiViewDocumentView on the document view object, then the value passed into the rguidLogicalView parameter determines which view is activated when the editor window is shown. By specifying the logical view GUID, you can request the specific view that matches the reason you are requesting the view. For example, specify LOGVIEWID_Debugging to get the view appropriate for debugging, 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 of the standard editor. For more information see VSITEMID.

  • punkDocDataExisting
    Type: IntPtr

    [in] Pointer to the IUnknown interface of the document data object.

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::OpenStandardEditor(
   [in] VSOSEFLAGS grfOpenStandard,
   [in] LPCOLESTR pszMkDocument,
   [in] REFGUID rguidLogicalView,
   [in] LPCOLESTR pszOwnerCaption,
   [in] IVsUIHierarchy *pHier,
   [in] VSITEMID itemid,
   [in] IUnknown *punkDocDataExisting,
   [in] IServiceProvider *pSP,
   [out, retval] IVsWindowFrame **ppWindowFrame
);

This method does not call back OpenItem.

.NET Framework Security

See Also

Reference

IVsUIShellOpenDocument Interface

Microsoft.VisualStudio.Shell.Interop Namespace