Nikolay Sivov : shlwapi: Forward SHDeleteEmptyKey() to shcore.
Alexandre Julliard
julliard at winehq.org
Tue Dec 4 16:33:54 CST 2018
Module: wine
Branch: master
Commit: a587b7938b24d8d9e0c7b9ae88c65af85a2dc8f9
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a587b7938b24d8d9e0c7b9ae88c65af85a2dc8f9
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Tue Dec 4 08:02:48 2018 +0300
shlwapi: Forward SHDeleteEmptyKey() to shcore.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
.../api-ms-win-downlevel-shlwapi-l2-1-0.spec | 4 +-
dlls/shcore/shcore.spec | 4 +-
dlls/shlwapi/reg.c | 68 ----------------------
dlls/shlwapi/shlwapi.spec | 4 +-
4 files changed, 6 insertions(+), 74 deletions(-)
diff --git a/dlls/api-ms-win-downlevel-shlwapi-l2-1-0/api-ms-win-downlevel-shlwapi-l2-1-0.spec b/dlls/api-ms-win-downlevel-shlwapi-l2-1-0/api-ms-win-downlevel-shlwapi-l2-1-0.spec
index a4a50b3..4ed7f84 100644
--- a/dlls/api-ms-win-downlevel-shlwapi-l2-1-0/api-ms-win-downlevel-shlwapi-l2-1-0.spec
+++ b/dlls/api-ms-win-downlevel-shlwapi-l2-1-0/api-ms-win-downlevel-shlwapi-l2-1-0.spec
@@ -19,8 +19,8 @@
@ stdcall SHCreateStreamOnFileEx(wstr long long long ptr ptr) shlwapi.SHCreateStreamOnFileEx
@ stdcall SHCreateStreamOnFileW(wstr long ptr) shlwapi.SHCreateStreamOnFileW
@ stdcall SHCreateThreadRef(ptr ptr) shlwapi.SHCreateThreadRef
-@ stdcall SHDeleteEmptyKeyA(long ptr) shlwapi.SHDeleteEmptyKeyA
-@ stdcall SHDeleteEmptyKeyW(long ptr) shlwapi.SHDeleteEmptyKeyW
+@ stdcall SHDeleteEmptyKeyA(long str) shlwapi.SHDeleteEmptyKeyA
+@ stdcall SHDeleteEmptyKeyW(long wstr) shlwapi.SHDeleteEmptyKeyW
@ stdcall SHDeleteKeyA(long str) shlwapi.SHDeleteKeyA
@ stdcall SHDeleteKeyW(long wstr) shlwapi.SHDeleteKeyW
@ stdcall SHDeleteValueA(long str str) shlwapi.SHDeleteValueA
diff --git a/dlls/shcore/shcore.spec b/dlls/shcore/shcore.spec
index 6ad1297..4c27179 100644
--- a/dlls/shcore/shcore.spec
+++ b/dlls/shcore/shcore.spec
@@ -40,8 +40,8 @@
@ stdcall SHCreateThread(ptr ptr long ptr)
@ stdcall SHCreateThreadRef(ptr ptr)
@ stub SHCreateThreadWithHandle
-@ stdcall SHDeleteEmptyKeyA(long ptr)
-@ stdcall SHDeleteEmptyKeyW(long ptr)
+@ stdcall SHDeleteEmptyKeyA(long str)
+@ stdcall SHDeleteEmptyKeyW(long wstr)
@ stdcall SHDeleteKeyA(long str)
@ stdcall SHDeleteKeyW(long wstr)
@ stdcall SHDeleteValueA(long str str)
diff --git a/dlls/shlwapi/reg.c b/dlls/shlwapi/reg.c
index 1633519..370161d 100644
--- a/dlls/shlwapi/reg.c
+++ b/dlls/shlwapi/reg.c
@@ -1591,74 +1591,6 @@ DWORD WINAPI SHDeleteKeyW(HKEY hKey, LPCWSTR lpszSubKey)
}
/*************************************************************************
- * SHDeleteEmptyKeyA [SHLWAPI.@]
- *
- * Delete a registry key with no sub keys.
- *
- * PARAMS
- * hKey [I] Handle to registry key
- * lpszSubKey [I] Name of sub key to delete
- *
- * RETURNS
- * Success: ERROR_SUCCESS. The key is deleted.
- * Failure: If the key is not empty, returns ERROR_KEY_HAS_CHILDREN. Otherwise
- * returns an error code from RegOpenKeyExA(), RegQueryInfoKeyA() or
- * RegDeleteKeyA().
- */
-DWORD WINAPI SHDeleteEmptyKeyA(HKEY hKey, LPCSTR lpszSubKey)
-{
- DWORD dwRet, dwKeyCount = 0;
- HKEY hSubKey = 0;
-
- TRACE("(hkey=%p,%s)\n", hKey, debugstr_a(lpszSubKey));
-
- dwRet = RegOpenKeyExA(hKey, lpszSubKey, 0, KEY_READ, &hSubKey);
- if(!dwRet)
- {
- dwRet = RegQueryInfoKeyA(hSubKey, NULL, NULL, NULL, &dwKeyCount,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- RegCloseKey(hSubKey);
- if(!dwRet)
- {
- if (!dwKeyCount)
- dwRet = RegDeleteKeyA(hKey, lpszSubKey);
- else
- dwRet = ERROR_KEY_HAS_CHILDREN;
- }
- }
- return dwRet;
-}
-
-/*************************************************************************
- * SHDeleteEmptyKeyW [SHLWAPI.@]
- *
- * See SHDeleteEmptyKeyA.
- */
-DWORD WINAPI SHDeleteEmptyKeyW(HKEY hKey, LPCWSTR lpszSubKey)
-{
- DWORD dwRet, dwKeyCount = 0;
- HKEY hSubKey = 0;
-
- TRACE("(hkey=%p, %s)\n", hKey, debugstr_w(lpszSubKey));
-
- dwRet = RegOpenKeyExW(hKey, lpszSubKey, 0, KEY_READ, &hSubKey);
- if(!dwRet)
- {
- dwRet = RegQueryInfoKeyW(hSubKey, NULL, NULL, NULL, &dwKeyCount,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- RegCloseKey(hSubKey);
- if(!dwRet)
- {
- if (!dwKeyCount)
- dwRet = RegDeleteKeyW(hKey, lpszSubKey);
- else
- dwRet = ERROR_KEY_HAS_CHILDREN;
- }
- }
- return dwRet;
-}
-
-/*************************************************************************
* SHDeleteOrphanKeyA [SHLWAPI.@]
*
* Delete a registry key with no sub keys or values.
diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec
index 30c34cb..a51088d 100644
--- a/dlls/shlwapi/shlwapi.spec
+++ b/dlls/shlwapi/shlwapi.spec
@@ -688,8 +688,8 @@
@ stdcall SHCreateStreamOnFileW(wstr long ptr) shcore.SHCreateStreamOnFileW
@ stdcall SHCreateStreamWrapper(ptr ptr long ptr)
@ stdcall SHCreateThreadRef(ptr ptr) shcore.SHCreateThreadRef
-@ stdcall SHDeleteEmptyKeyA(long ptr)
-@ stdcall SHDeleteEmptyKeyW(long ptr)
+@ stdcall SHDeleteEmptyKeyA(long str) shcore.SHDeleteEmptyKeyA
+@ stdcall SHDeleteEmptyKeyW(long wstr) shcore.SHDeleteEmptyKeyW
@ stdcall SHDeleteKeyA(long str)
@ stdcall SHDeleteKeyW(long wstr)
@ stdcall SHDeleteOrphanKeyA(long str)
More information about the wine-cvs
mailing list