[PATCH 3/4] shlwapi: Forward SHSetValue() to shcore.dll.
Nikolay Sivov
nsivov at codeweavers.com
Tue May 12 14:41:10 CDT 2020
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/shlwapi/reg.c | 73 ---------------------------------------
dlls/shlwapi/shlwapi.spec | 4 +--
2 files changed, 2 insertions(+), 75 deletions(-)
diff --git a/dlls/shlwapi/reg.c b/dlls/shlwapi/reg.c
index 0c982384b3..78188e8fcb 100644
--- a/dlls/shlwapi/reg.c
+++ b/dlls/shlwapi/reg.c
@@ -47,79 +47,6 @@ static const WCHAR szExtensionW[] = { 'E', 'x', 't','e','n','s','i','o','n','\0'
INT WINAPI SHStringFromGUIDW(REFGUID,LPWSTR,INT);
HRESULT WINAPI SHRegGetCLSIDKeyW(REFGUID,LPCWSTR,BOOL,BOOL,PHKEY);
-/*************************************************************************
- * SHSetValueA [SHLWAPI.@]
- *
- * Set a value in the registry.
- *
- * PARAMS
- * hKey [I] Handle to registry key
- * lpszSubKey [I] Name of sub key under hKey
- * lpszValue [I] Name of value to set
- * dwType [I] Type of the value
- * pvData [I] Data of the value
- * cbData [I] Size of the value
- *
- * RETURNS
- * Success: ERROR_SUCCESS. The value is set with the data given.
- * Failure: An error code from RegCreateKeyExA() or RegSetValueExA()
- *
- * NOTES
- * If lpszSubKey does not exist, it is created before the value is set. If
- * lpszSubKey is NULL or an empty string, then the value is added directly
- * to hKey instead.
- */
-DWORD WINAPI SHSetValueA(HKEY hKey, LPCSTR lpszSubKey, LPCSTR lpszValue,
- DWORD dwType, LPCVOID pvData, DWORD cbData)
-{
- DWORD dwRet = ERROR_SUCCESS, dwDummy;
- HKEY hSubKey;
-
- TRACE("(hkey=%p,%s,%s,%d,%p,%d)\n", hKey, debugstr_a(lpszSubKey),
- debugstr_a(lpszValue), dwType, pvData, cbData);
-
- if (lpszSubKey && *lpszSubKey)
- dwRet = RegCreateKeyExA(hKey, lpszSubKey, 0, NULL,
- 0, KEY_SET_VALUE, NULL, &hSubKey, &dwDummy);
- else
- hSubKey = hKey;
- if (!dwRet)
- {
- dwRet = RegSetValueExA(hSubKey, lpszValue, 0, dwType, pvData, cbData);
- if (hSubKey != hKey)
- RegCloseKey(hSubKey);
- }
- return dwRet;
-}
-
-/*************************************************************************
- * SHSetValueW [SHLWAPI.@]
- *
- * See SHSetValueA.
- */
-DWORD WINAPI SHSetValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue,
- DWORD dwType, LPCVOID pvData, DWORD cbData)
-{
- DWORD dwRet = ERROR_SUCCESS, dwDummy;
- HKEY hSubKey;
-
- TRACE("(hkey=%p,%s,%s,%d,%p,%d)\n", hKey, debugstr_w(lpszSubKey),
- debugstr_w(lpszValue), dwType, pvData, cbData);
-
- if (lpszSubKey && *lpszSubKey)
- dwRet = RegCreateKeyExW(hKey, lpszSubKey, 0, NULL,
- 0, KEY_SET_VALUE, NULL, &hSubKey, &dwDummy);
- else
- hSubKey = hKey;
- if (!dwRet)
- {
- dwRet = RegSetValueExW(hSubKey, lpszValue, 0, dwType, pvData, cbData);
- if (hSubKey != hKey)
- RegCloseKey(hSubKey);
- }
- return dwRet;
-}
-
/*************************************************************************
* SHQueryValueExA [SHLWAPI.@]
*
diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec
index de25ed58c1..ed7810c676 100644
--- a/dlls/shlwapi/shlwapi.spec
+++ b/dlls/shlwapi/shlwapi.spec
@@ -748,8 +748,8 @@
@ stdcall SHRegisterValidateTemplate(wstr long)
@ stdcall SHReleaseThreadRef() shcore.SHReleaseThreadRef
@ stdcall SHSetThreadRef(ptr) shcore.SHSetThreadRef
-@ stdcall SHSetValueA (long str str long ptr long)
-@ stdcall SHSetValueW (long wstr wstr long ptr long)
+@ stdcall -import SHSetValueA(long str str long ptr long)
+@ stdcall -import SHSetValueW(long wstr wstr long ptr long)
@ stdcall SHSkipJunction(ptr ptr)
@ stdcall SHStrDupA (str ptr)
@ stdcall SHStrDupW (wstr ptr)
--
2.26.2
More information about the wine-devel
mailing list