Compartilhar via


IVsRegisterEditors.RegisterEditor(Guid, IVsEditorFactory, UInt32) Method

Definition

Registers an editor.

public:
 int RegisterEditor(Guid % rguidEditor, Microsoft::VisualStudio::Shell::Interop::IVsEditorFactory ^ pVsPF, [Runtime::InteropServices::Out] System::UInt32 % pdwCookie);
public int RegisterEditor (ref Guid rguidEditor, Microsoft.VisualStudio.Shell.Interop.IVsEditorFactory pVsPF, out uint pdwCookie);
abstract member RegisterEditor : Guid * Microsoft.VisualStudio.Shell.Interop.IVsEditorFactory * uint32 -> int
Public Function RegisterEditor (ByRef rguidEditor As Guid, pVsPF As IVsEditorFactory, ByRef pdwCookie As UInteger) As Integer

Parameters

rguidEditor
Guid

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

pVsPF
IVsEditorFactory

[in] Pointer to the IVsEditorFactory interface.

pdwCookie
UInt32

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

Returns

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.

Applies to