[PATCH 2/4] shlwapi: Forward SHDeleteValueW() to shcore.dll.

Nikolay Sivov nsivov at codeweavers.com
Tue May 12 14:41:09 CDT 2020


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/shlwapi/reg.c        | 51 ---------------------------------------
 dlls/shlwapi/shlwapi.spec |  4 +--
 2 files changed, 2 insertions(+), 53 deletions(-)

diff --git a/dlls/shlwapi/reg.c b/dlls/shlwapi/reg.c
index 83d83d3cb2..0c982384b3 100644
--- a/dlls/shlwapi/reg.c
+++ b/dlls/shlwapi/reg.c
@@ -342,57 +342,6 @@ DWORD WINAPI SHDeleteOrphanKeyW(HKEY hKey, LPCWSTR lpszSubKey)
   return dwRet;
 }
 
-/*************************************************************************
- * SHDeleteValueA   [SHLWAPI.@]
- *
- * Delete a value from the registry.
- *
- * PARAMS
- *   hKey       [I] Handle to registry key
- *   lpszSubKey [I] Name of sub key containing value to delete
- *   lpszValue  [I] Name of value to delete
- *
- * RETURNS
- *   Success: ERROR_SUCCESS. The value is deleted.
- *   Failure: An error code from RegOpenKeyExA() or RegDeleteValueA().
- */
-DWORD WINAPI SHDeleteValueA(HKEY hKey, LPCSTR lpszSubKey, LPCSTR lpszValue)
-{
-  DWORD dwRet;
-  HKEY hSubKey;
-
-  TRACE("(hkey=%p,%s,%s)\n", hKey, debugstr_a(lpszSubKey), debugstr_a(lpszValue));
-
-  dwRet = RegOpenKeyExA(hKey, lpszSubKey, 0, KEY_SET_VALUE, &hSubKey);
-  if (!dwRet)
-  {
-    dwRet = RegDeleteValueA(hSubKey, lpszValue);
-    RegCloseKey(hSubKey);
-  }
-  return dwRet;
-}
-
-/*************************************************************************
- * SHDeleteValueW   [SHLWAPI.@]
- *
- * See SHDeleteValueA.
- */
-DWORD WINAPI SHDeleteValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue)
-{
-  DWORD dwRet;
-  HKEY hSubKey;
-
-  TRACE("(hkey=%p,%s,%s)\n", hKey, debugstr_w(lpszSubKey), debugstr_w(lpszValue));
-
-  dwRet = RegOpenKeyExW(hKey, lpszSubKey, 0, KEY_SET_VALUE, &hSubKey);
-  if (!dwRet)
-  {
-    dwRet = RegDeleteValueW(hSubKey, lpszValue);
-    RegCloseKey(hSubKey);
-  }
-  return dwRet;
-}
-
 /*************************************************************************
  * @   [SHLWAPI.205]
  *
diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec
index 98a3ab7d99..de25ed58c1 100644
--- a/dlls/shlwapi/shlwapi.spec
+++ b/dlls/shlwapi/shlwapi.spec
@@ -694,8 +694,8 @@
 @ stdcall SHDeleteKeyW(long wstr) shcore.SHDeleteKeyW
 @ stdcall SHDeleteOrphanKeyA(long str)
 @ stdcall SHDeleteOrphanKeyW(long wstr)
-@ stdcall SHDeleteValueA(long  str  str)
-@ stdcall SHDeleteValueW(long wstr wstr)
+@ stdcall -import SHDeleteValueA(long str str)
+@ stdcall -import SHDeleteValueW(long wstr wstr)
 @ stdcall SHEnumKeyExA(long long str ptr) shcore.SHEnumKeyExA
 @ stdcall SHEnumKeyExW(long long wstr ptr) shcore.SHEnumKeyExW
 @ stdcall SHEnumValueA(long long str ptr ptr ptr ptr) shcore.SHEnumValueA
-- 
2.26.2




More information about the wine-devel mailing list