ReactOS  0.4.15-dev-1150-g593bcce
RegSetKeyValue.c File Reference
#include "advapi32_vista.h"
Include dependency graph for RegSetKeyValue.c:

Go to the source code of this file.

Functions

LONG WINAPI RegSetKeyValueW (HKEY hkey, LPCWSTR subkey, LPCWSTR name, DWORD type, const void *data, DWORD len)
 

Function Documentation

◆ RegSetKeyValueW()

LONG WINAPI RegSetKeyValueW ( HKEY  hkey,
LPCWSTR  subkey,
LPCWSTR  name,
DWORD  type,
const void data,
DWORD  len 
)

Definition at line 9 of file RegSetKeyValue.c.

10 {
11  HKEY hsubkey = NULL;
12  DWORD ret;
13 
14  //TRACE("(%p,%s,%s,%d,%p,%d)\n", hkey, debugstr_w(subkey), debugstr_w(name), type, data, len );
15 
16  if (subkey && subkey[0]) /* need to create the subkey */
17  {
18  if ((ret = RegCreateKeyW( hkey, subkey, &hsubkey )) != ERROR_SUCCESS) return ret;
19  hkey = hsubkey;
20  }
21 
22  ret = RegSetValueExW( hkey, name, 0, type, (const BYTE*)data, len );
23  if (hsubkey) RegCloseKey( hsubkey );
24  return ret;
25 }
#define ERROR_SUCCESS
Definition: deptool.c:10
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
smooth NULL
Definition: ftsmooth.c:416
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4895
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
int ret
GLenum GLsizei len
Definition: glext.h:6722
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1199
unsigned char BYTE
Definition: xxhash.c:193
Definition: name.c:38