IVsRegisterEditors::RegisterEditor Method (Guid, IVsEditorFactory^, UInt32)

 

Registers an editor.

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

int RegisterEditor(
	[InAttribute] Guid% rguidEditor,
	IVsEditorFactory^ pVsPF,
	[OutAttribute] unsigned int% pdwCookie
)

Parameters

rguidEditor
Type: System::Guid

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

pVsPF
Type: Microsoft.VisualStudio.Shell.Interop::IVsEditorFactory^

[in] Pointer to the IVsEditorFactory interface.

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.

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.

Return to top
Show: