RegSetValueEx
RegSetValueEx sets the data for the specified value in the specified registry key.
Syntax
LONG RegSetValueEx(
HKEY hKey,
LPCTSTR lpValueName,
DWORD Reserved,
DWORD dwType,
const BYTE *lpData,
DWORD cbData
);
Parameters
hKey
A handle that can only be one of the following predefined keys:
- HKEY_LOCAL_MACHINE
- HKEY_USERS
lpValueName
The name of the value to be set. This parameter must not be NULL.
Reserved
This parameter is reserved and must be zero.
dwType
Type of data pointed by the lpData parameter.
lpData
Data to be stored with the specified value name. For string-based types, such as REG_SZ, the string must be null-terminated. This parameter can only be NULL if cbData is 0.
cbData
Size of the information pointed to by the lpData parameter, in bytes. If the data type is of type REG_SZ, cbData must include the size of the terminating null character or characters.
Return Value
If the function succeeds, the return value is ERROR_SUCCESS. If the function fails, the return value is a nonzero error code.
Requirements
Minimum supported version | Header | Library |
---|---|---|
eRTOS 1.0 SDK |
windows.h | rtkrnl.lib |
See Also: