mirror of
https://github.com/reactos/reactos.git
synced 2025-02-28 19:32:59 +00:00
[ADVAPI32_VISTA] Use RegSetValueW from reg.c
This commit is contained in:
parent
90a9171276
commit
d69ff10113
3 changed files with 2 additions and 26 deletions
|
@ -2166,6 +2166,7 @@ RegGetValueA(HKEY hKey,
|
|||
return ret;
|
||||
}
|
||||
|
||||
#endif // _ADVAPI32_VISTA_
|
||||
|
||||
/************************************************************************
|
||||
* RegSetKeyValueW
|
||||
|
@ -2236,6 +2237,7 @@ Cleanup:
|
|||
return Ret;
|
||||
}
|
||||
|
||||
#ifndef _ADVAPI32_VISTA_
|
||||
|
||||
/************************************************************************
|
||||
* RegSetKeyValueA
|
||||
|
|
|
@ -13,7 +13,6 @@ include_directories(
|
|||
list(APPEND SOURCE
|
||||
DllMain.c
|
||||
../advapi32/reg/reg.c
|
||||
RegSetKeyValue.c
|
||||
RegLoadMUIString.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/advapi32_vista.def)
|
||||
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
|
||||
#include "advapi32_vista.h"
|
||||
|
||||
/* Taken from Wine advapi32/registry.c */
|
||||
|
||||
/******************************************************************************
|
||||
* RegSetKeyValueW [ADVAPI32.@]
|
||||
*/
|
||||
LONG WINAPI RegSetKeyValueW( HKEY hkey, LPCWSTR subkey, LPCWSTR name, DWORD type, const void *data, DWORD len )
|
||||
{
|
||||
HKEY hsubkey = NULL;
|
||||
DWORD ret;
|
||||
|
||||
//TRACE("(%p,%s,%s,%d,%p,%d)\n", hkey, debugstr_w(subkey), debugstr_w(name), type, data, len );
|
||||
|
||||
if (subkey && subkey[0]) /* need to create the subkey */
|
||||
{
|
||||
if ((ret = RegCreateKeyW( hkey, subkey, &hsubkey )) != ERROR_SUCCESS) return ret;
|
||||
hkey = hsubkey;
|
||||
}
|
||||
|
||||
ret = RegSetValueExW( hkey, name, 0, type, (const BYTE*)data, len );
|
||||
if (hsubkey) RegCloseKey( hsubkey );
|
||||
return ret;
|
||||
}
|
Loading…
Reference in a new issue