Skip to content

Latest commit

 

History

History
74 lines (51 loc) · 1.41 KB

RegSetValueEx.md

File metadata and controls

74 lines (51 loc) · 1.41 KB

Home

Function name : RegSetValueEx

Group: Registry - Library: advapi32


The RegSetValueEx function sets the data and type of a specified value under a registry key.


Code examples:

Class library providing access to the System Registry

Declaration:

LONG RegSetValueEx(
  HKEY hKey,
  LPCTSTR lpValueName,
  DWORD Reserved,
  DWORD dwType,
  const BYTE* lpData,
  DWORD cbData
);
  

FoxPro declaration:

DECLARE INTEGER RegSetValueEx IN advapi32;
	INTEGER   hKey,;
	STRING    lpValueName,;
	INTEGER   Reserved,;
	INTEGER   dwType,;
	STRING  @ lpData,;
	INTEGER   cbData
  

Parameters:

hKey [in] Handle to an open key.

lpValueName [in] Pointer to a string containing the name of the value to set.

Reserved Reserved; must be zero.

dwType [in] Type of data pointed to by the lpData parameter.

lpData [in] Pointer to a buffer containing the data to be stored with the specified value name.

cbData [in] Size of the information pointed to by the lpData parameter, in bytes.


Return value:

If the function succeeds, the return value is ERROR_SUCCESS (0).


Comments:

See also RegCreateKeyEx, RegFlushKey, RegOpenKeyEx, RegQueryValueEx.