diff --git a/dll/win32/advapi32/reg/reg.c b/dll/win32/advapi32/reg/reg.c index 8ca0927d678..75c37217e72 100644 --- a/dll/win32/advapi32/reg/reg.c +++ b/dll/win32/advapi32/reg/reg.c @@ -2166,6 +2166,7 @@ RegGetValueA(HKEY hKey, return ret; } +#endif // _ADVAPI32_VISTA_ /************************************************************************ * RegSetKeyValueW @@ -2236,6 +2237,7 @@ Cleanup: return Ret; } +#ifndef _ADVAPI32_VISTA_ /************************************************************************ * RegSetKeyValueA diff --git a/dll/win32/advapi32_vista/CMakeLists.txt b/dll/win32/advapi32_vista/CMakeLists.txt index 4cb29d3844f..add67945a36 100644 --- a/dll/win32/advapi32_vista/CMakeLists.txt +++ b/dll/win32/advapi32_vista/CMakeLists.txt @@ -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) diff --git a/dll/win32/advapi32_vista/RegSetKeyValue.c b/dll/win32/advapi32_vista/RegSetKeyValue.c deleted file mode 100644 index 8701eb87df4..00000000000 --- a/dll/win32/advapi32_vista/RegSetKeyValue.c +++ /dev/null @@ -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; -}