EmEditor Home - EmEditor Help - Plug-in Reference - Inline Functions

Editor_RegSetValue

Sets a value into the Registry or an INI file depending on the EmEditor settings. You can use this inline function or explicitly send the EE_REG_SET_VALUE message.

Editor_RegSetValue( HWND hwnd, DWORD dwKey, LPCWSTR pszConfig, LPCWSTR pszValue, DWORD dwType, const BYTE* lpData, DWORD cbData, DWORD dwFlags );

Parameters

hwnd

Specifies the window handle of the view or frame of EmEditor.

dwKey

Specifies one of the following values to specify a key. EEREG_CONFIG and EEREG_EMEDITORPLUGIN require the pszConfig parameter to specify the key.

EEREG_COMMON HKEY_CURRENT_USER\Software\EmSoft\EmEditor v3\Common or eeCommon.ini\[Common]
EEREG_REGIST HKEY_CURRENT_USER\Software\EmSoft\Regist or eeCommon.ini\[Regist]
EEREG_MACROS HKEY_CURRENT_USER\Software\EmSoft\EmEditor v3\Macros or eeCommon.ini\[Macros]
EEREG_PLUGINS HKEY_CURRENT_USER\Software\EmSoft\EmEditor v3\PlugIns or eeCommon.ini\[PlugIns]
EEREG_RECENT_FILE_LIST HKEY_CURRENT_USER\Software\EmSoft\EmEditor v3\Recent File List or eeCommon.ini\[Recent File List]
EEREG_RECENT_FOLDER_LIST HKEY_CURRENT_USER\Software\EmSoft\EmEditor v3\Recent Folder List or eeCommon.ini\[Recent Folder List]
EEREG_RECENT_FONT_LIST HKEY_CURRENT_USER\Software\EmSoft\EmEditor v3\Recent Font List or eeCommon.ini\[Recent Font List]
EEREG_RECENT_INSERT_LIST HKEY_CURRENT_USER\Software\EmSoft\EmEditor v3\Recent Insert List or eeCommon.ini\[Recent Insert List]
EEREG_AUTOSAVE HKEY_CURRENT_USER\Software\EmSoft\EmEditor v3\AutoSave or eeCommon.ini\[AutoSave]
EEREG_LM_COMMON HKEY_LOCAL_MACHINE\SOFTWARE\EmSoft\EmEditor v3\Common or eeLM.ini\[Common]
EEREG_LM_REGIST HKEY_LOCAL_MACHINE\SOFTWARE\EmSoft\Regist or eeLM.ini\[Regist]
EEREG_CONFIG HKEY_CURRENT_USER\Software\EmSoft\EmEditor v3\Config\(pszConfig) or eeConfig.ini\[(pszConfig)]
EEREG_EMEDITORPLUGIN HKEY_CURRENT_USER\Software\EmSoft\EmEditorPlugIns\(pszConfig) or eePlugins.ini\[(pszConfig)]
EEREG_EMEDITORUSERS HKEY_CURRENT_USER\Software\EmSoft\EmEditorUsers\(pszConfig) or eeUsers.ini\[(pszConfig)]

pszConfig

Specifies an additional string to specify the key when EEREG_CONFIG, EEREG_EMEDITORPLUGIN, or EEREG_EMEDITORUSERS is selected.

pszValue

Specifies the name of the value to be set. If this parameter is NULL and the dwType parameter is REG_SZ, the entire key pointed to by dwKey and pszConfig parameters, including all entries within the key, is deleted.

dwType

Specifies one of the following values to specify the type of data pointed to by the lpData parameter.

REG_BINARY Binary data in any form.
REG_DWORD A 32-bit number.
REG_SZ A null-terminated Unicode string.

lpData

The data to be stored. For the REG_SZ type, the string must be null-terminated. If this parameter is NULL, the value pointed to by pszValue parameter is removed.

cbData

The size of the information pointed to by the lpData parameter, in bytes. If the data is of type REG_SZ, cbData must include the size of the terminating null character.

dwFlags

This parameter can be EE_REG_VARIABLE_SIZE if the binary data is of a variable size. Otherwise, it must be zero.

Return Values

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is a nonzero error code defined in Winerror.h.

Version

Supported on EmEditor Version 7.00 or later.

Copyright 2003-2015 by Emurasoft, Inc.