Freigeben über


IVsRegisterEditors.RegisterEditor Method

Registers an editor.

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

Syntax

'Declaration
Function RegisterEditor ( _
    ByRef rguidEditor As Guid, _
    pVsPF As IVsEditorFactory, _
    <OutAttribute> ByRef pdwCookie As UInteger _
) As Integer
'Usage
Dim instance As IVsRegisterEditors
Dim rguidEditor As Guid
Dim pVsPF As IVsEditorFactory
Dim pdwCookie As UInteger
Dim returnValue As Integer

returnValue = instance.RegisterEditor(rguidEditor, _
    pVsPF, pdwCookie)
int RegisterEditor(
    ref Guid rguidEditor,
    IVsEditorFactory pVsPF,
    out uint pdwCookie
)
int RegisterEditor(
    [InAttribute] Guid% rguidEditor, 
    [InAttribute] IVsEditorFactory^ pVsPF, 
    [OutAttribute] unsigned int% pdwCookie
)
function RegisterEditor(
    rguidEditor : Guid, 
    pVsPF : IVsEditorFactory, 
    pdwCookie : uint
) : int

Parameters

  • rguidEditor
    Type: System.Guid%

    [in] Unique GUID of the editor that was registered.

  • pdwCookie
    Type: System.UInt32%

    [out] Abstract handle to be used later to unregister this editor.

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 IVsRegisterEditors::RegisterEditor(
   [in] REFGUID rguidEditor,
   [in] IVsEditorFactory *pVsPF,
   [out] VSCOOKIE *pdwCookie
);

The GUID of the editor factory that was registered is used in the VSPackages SetSite.

Permissions

See Also

Reference

IVsRegisterEditors Interface

IVsRegisterEditors Members

Microsoft.VisualStudio.Shell.Interop Namespace