mirror of
https://github.com/reactos/reactos.git
synced 2025-01-02 12:32:47 +00:00
[ADVAPI32_VISTA] Import RegSetKeyValueW() from Wine Staging 1.7.55. CORE-10536
svn path=/trunk/; revision=69913
This commit is contained in:
parent
1024999f67
commit
0e5679dd6d
3 changed files with 27 additions and 0 deletions
|
@ -8,6 +8,7 @@ spec2def(advapi32_vista.dll advapi32_vista.spec ADD_IMPORTLIB)
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE
|
||||||
DllMain.c
|
DllMain.c
|
||||||
RegDeleteTree.c
|
RegDeleteTree.c
|
||||||
|
RegSetKeyValue.c
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/advapi32_vista.def)
|
${CMAKE_CURRENT_BINARY_DIR}/advapi32_vista.def)
|
||||||
|
|
||||||
add_library(advapi32_vista SHARED ${SOURCE})
|
add_library(advapi32_vista SHARED ${SOURCE})
|
||||||
|
|
25
reactos/dll/win32/advapi32_vista/RegSetKeyValue.c
Normal file
25
reactos/dll/win32/advapi32_vista/RegSetKeyValue.c
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
|
||||||
|
#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;
|
||||||
|
}
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
@ stdcall RegDeleteTreeA(long str)
|
@ stdcall RegDeleteTreeA(long str)
|
||||||
@ stdcall RegDeleteTreeW(long wstr)
|
@ stdcall RegDeleteTreeW(long wstr)
|
||||||
|
@ stdcall RegSetKeyValueW(long wstr wstr long ptr long)
|
||||||
|
|
Loading…
Reference in a new issue