shlwapi: Forward SHDeleteEmptyKey() to shcore.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ac516a700c
commit
a587b7938b
|
@ -19,8 +19,8 @@
|
||||||
@ stdcall SHCreateStreamOnFileEx(wstr long long long ptr ptr) shlwapi.SHCreateStreamOnFileEx
|
@ stdcall SHCreateStreamOnFileEx(wstr long long long ptr ptr) shlwapi.SHCreateStreamOnFileEx
|
||||||
@ stdcall SHCreateStreamOnFileW(wstr long ptr) shlwapi.SHCreateStreamOnFileW
|
@ stdcall SHCreateStreamOnFileW(wstr long ptr) shlwapi.SHCreateStreamOnFileW
|
||||||
@ stdcall SHCreateThreadRef(ptr ptr) shlwapi.SHCreateThreadRef
|
@ stdcall SHCreateThreadRef(ptr ptr) shlwapi.SHCreateThreadRef
|
||||||
@ stdcall SHDeleteEmptyKeyA(long ptr) shlwapi.SHDeleteEmptyKeyA
|
@ stdcall SHDeleteEmptyKeyA(long str) shlwapi.SHDeleteEmptyKeyA
|
||||||
@ stdcall SHDeleteEmptyKeyW(long ptr) shlwapi.SHDeleteEmptyKeyW
|
@ stdcall SHDeleteEmptyKeyW(long wstr) shlwapi.SHDeleteEmptyKeyW
|
||||||
@ stdcall SHDeleteKeyA(long str) shlwapi.SHDeleteKeyA
|
@ stdcall SHDeleteKeyA(long str) shlwapi.SHDeleteKeyA
|
||||||
@ stdcall SHDeleteKeyW(long wstr) shlwapi.SHDeleteKeyW
|
@ stdcall SHDeleteKeyW(long wstr) shlwapi.SHDeleteKeyW
|
||||||
@ stdcall SHDeleteValueA(long str str) shlwapi.SHDeleteValueA
|
@ stdcall SHDeleteValueA(long str str) shlwapi.SHDeleteValueA
|
||||||
|
|
|
@ -40,8 +40,8 @@
|
||||||
@ stdcall SHCreateThread(ptr ptr long ptr)
|
@ stdcall SHCreateThread(ptr ptr long ptr)
|
||||||
@ stdcall SHCreateThreadRef(ptr ptr)
|
@ stdcall SHCreateThreadRef(ptr ptr)
|
||||||
@ stub SHCreateThreadWithHandle
|
@ stub SHCreateThreadWithHandle
|
||||||
@ stdcall SHDeleteEmptyKeyA(long ptr)
|
@ stdcall SHDeleteEmptyKeyA(long str)
|
||||||
@ stdcall SHDeleteEmptyKeyW(long ptr)
|
@ stdcall SHDeleteEmptyKeyW(long wstr)
|
||||||
@ stdcall SHDeleteKeyA(long str)
|
@ stdcall SHDeleteKeyA(long str)
|
||||||
@ stdcall SHDeleteKeyW(long wstr)
|
@ stdcall SHDeleteKeyW(long wstr)
|
||||||
@ stdcall SHDeleteValueA(long str str)
|
@ stdcall SHDeleteValueA(long str str)
|
||||||
|
|
|
@ -1590,74 +1590,6 @@ DWORD WINAPI SHDeleteKeyW(HKEY hKey, LPCWSTR lpszSubKey)
|
||||||
return dwRet;
|
return dwRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
|
||||||
* 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.@]
|
* SHDeleteOrphanKeyA [SHLWAPI.@]
|
||||||
*
|
*
|
||||||
|
|
|
@ -688,8 +688,8 @@
|
||||||
@ stdcall SHCreateStreamOnFileW(wstr long ptr) shcore.SHCreateStreamOnFileW
|
@ stdcall SHCreateStreamOnFileW(wstr long ptr) shcore.SHCreateStreamOnFileW
|
||||||
@ stdcall SHCreateStreamWrapper(ptr ptr long ptr)
|
@ stdcall SHCreateStreamWrapper(ptr ptr long ptr)
|
||||||
@ stdcall SHCreateThreadRef(ptr ptr) shcore.SHCreateThreadRef
|
@ stdcall SHCreateThreadRef(ptr ptr) shcore.SHCreateThreadRef
|
||||||
@ stdcall SHDeleteEmptyKeyA(long ptr)
|
@ stdcall SHDeleteEmptyKeyA(long str) shcore.SHDeleteEmptyKeyA
|
||||||
@ stdcall SHDeleteEmptyKeyW(long ptr)
|
@ stdcall SHDeleteEmptyKeyW(long wstr) shcore.SHDeleteEmptyKeyW
|
||||||
@ stdcall SHDeleteKeyA(long str)
|
@ stdcall SHDeleteKeyA(long str)
|
||||||
@ stdcall SHDeleteKeyW(long wstr)
|
@ stdcall SHDeleteKeyW(long wstr)
|
||||||
@ stdcall SHDeleteOrphanKeyA(long str)
|
@ stdcall SHDeleteOrphanKeyA(long str)
|
||||||
|
|
Loading…
Reference in New Issue