Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/shlwapi/Makefile.in | 2 +- dlls/shlwapi/reg.c | 20 -------------------- dlls/shlwapi/shlwapi.spec | 2 +- 3 files changed, 2 insertions(+), 22 deletions(-)
diff --git a/dlls/shlwapi/Makefile.in b/dlls/shlwapi/Makefile.in index 179fcad765..e94028bced 100644 --- a/dlls/shlwapi/Makefile.in +++ b/dlls/shlwapi/Makefile.in @@ -1,7 +1,7 @@ EXTRADEFS = -D_SHLWAPI_ MODULE = shlwapi.dll IMPORTLIB = shlwapi -IMPORTS = uuid user32 gdi32 advapi32 kernelbase +IMPORTS = uuid user32 gdi32 advapi32 kernelbase shcore DELAYIMPORTS = userenv oleaut32 ole32 comctl32 comdlg32 mpr mlang urlmon shell32 winmm version
EXTRADLLFLAGS = -mno-cygwin diff --git a/dlls/shlwapi/reg.c b/dlls/shlwapi/reg.c index f89636b12a..fb57f1fa16 100644 --- a/dlls/shlwapi/reg.c +++ b/dlls/shlwapi/reg.c @@ -932,26 +932,6 @@ BOOL WINAPI UnregisterExtensionForMIMETypeW(LPCWSTR lpszType) return TRUE; }
-/************************************************************************* - * SHRegDuplicateHKey [SHLWAPI.@] - * - * Create a duplicate of a registry handle. - * - * PARAMS - * hKey [I] key to duplicate. - * - * RETURNS - * A new handle pointing to the same key as hKey. - */ -HKEY WINAPI SHRegDuplicateHKey(HKEY hKey) -{ - HKEY newKey = 0; - - RegOpenKeyExA(hKey, 0, 0, MAXIMUM_ALLOWED, &newKey); - TRACE("new key is %p\n", newKey); - return newKey; -} - /* * The following functions are ORDINAL ONLY: */ diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index f47f41aea4..2991a532e1 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -720,7 +720,7 @@ @ stdcall SHRegDeleteEmptyUSKeyW(long wstr long) @ stdcall SHRegDeleteUSValueA(long str long) @ stdcall SHRegDeleteUSValueW(long wstr long) -@ stdcall SHRegDuplicateHKey (long) +@ stdcall -import SHRegDuplicateHKey (long) @ stdcall SHRegEnumUSKeyA(long long str ptr long) @ stdcall SHRegEnumUSKeyW(long long wstr ptr long) @ stdcall SHRegEnumUSValueA(long long ptr ptr ptr ptr ptr long)
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/shlwapi/reg.c | 45 --------------------------------------- dlls/shlwapi/shlwapi.spec | 4 ++-- 2 files changed, 2 insertions(+), 47 deletions(-)
diff --git a/dlls/shlwapi/reg.c b/dlls/shlwapi/reg.c index fb57f1fa16..f8af8b3065 100644 --- a/dlls/shlwapi/reg.c +++ b/dlls/shlwapi/reg.c @@ -47,51 +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);
- -/************************************************************************* - * SHRegGetPathA [SHLWAPI.@] - * - * Get a path from the registry. - * - * PARAMS - * hKey [I] Handle to registry key - * lpszSubKey [I] Name of sub key containing path to get - * lpszValue [I] Name of value containing path to get - * lpszPath [O] Buffer for returned path - * dwFlags [I] Reserved - * - * RETURNS - * Success: ERROR_SUCCESS. lpszPath contains the path. - * Failure: An error code from RegOpenKeyExA() or SHQueryValueExA(). - */ -DWORD WINAPI SHRegGetPathA(HKEY hKey, LPCSTR lpszSubKey, LPCSTR lpszValue, - LPSTR lpszPath, DWORD dwFlags) -{ - DWORD dwSize = MAX_PATH; - - TRACE("(hkey=%p,%s,%s,%p,%d)\n", hKey, debugstr_a(lpszSubKey), - debugstr_a(lpszValue), lpszPath, dwFlags); - - return SHGetValueA(hKey, lpszSubKey, lpszValue, 0, lpszPath, &dwSize); -} - -/************************************************************************* - * SHRegGetPathW [SHLWAPI.@] - * - * See SHRegGetPathA. - */ -DWORD WINAPI SHRegGetPathW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue, - LPWSTR lpszPath, DWORD dwFlags) -{ - DWORD dwSize = MAX_PATH; - - TRACE("(hkey=%p,%s,%s,%p,%d)\n", hKey, debugstr_w(lpszSubKey), - debugstr_w(lpszValue), lpszPath, dwFlags); - - return SHGetValueW(hKey, lpszSubKey, lpszValue, 0, lpszPath, &dwSize); -} - - /************************************************************************* * SHRegSetPathA [SHLWAPI.@] * diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index 2991a532e1..334b5fece5 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -727,8 +727,8 @@ @ stdcall SHRegEnumUSValueW(long long ptr ptr ptr ptr ptr long) @ stdcall SHRegGetBoolUSValueA(str str long long) @ stdcall SHRegGetBoolUSValueW(wstr wstr long long) -@ stdcall SHRegGetPathA(long str str ptr long) -@ stdcall SHRegGetPathW(long wstr wstr ptr long) +@ stdcall -import SHRegGetPathA(long str str ptr long) +@ stdcall -import SHRegGetPathW(long wstr wstr ptr long) @ stdcall SHRegGetUSValueA ( str str ptr ptr ptr long ptr long ) @ stdcall SHRegGetUSValueW ( wstr wstr ptr ptr ptr long ptr long ) @ stdcall SHRegGetValueA ( long str str long ptr ptr ptr ) advapi32.RegGetValueA
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/shlwapi/reg.c | 53 --------------------------------------- dlls/shlwapi/shlwapi.spec | 4 +-- 2 files changed, 2 insertions(+), 55 deletions(-)
diff --git a/dlls/shlwapi/reg.c b/dlls/shlwapi/reg.c index f8af8b3065..08cc26ee48 100644 --- a/dlls/shlwapi/reg.c +++ b/dlls/shlwapi/reg.c @@ -47,59 +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);
-/************************************************************************* - * SHRegSetPathA [SHLWAPI.@] - * - * Write a path to the registry. - * - * PARAMS - * hKey [I] Handle to registry key - * lpszSubKey [I] Name of sub key containing path to set - * lpszValue [I] Name of value containing path to set - * lpszPath [O] Path to write - * dwFlags [I] Reserved, must be 0. - * - * RETURNS - * Success: ERROR_SUCCESS. - * Failure: An error code from SHSetValueA(). - */ -DWORD WINAPI SHRegSetPathA(HKEY hKey, LPCSTR lpszSubKey, LPCSTR lpszValue, - LPCSTR lpszPath, DWORD dwFlags) -{ - char szBuff[MAX_PATH]; - - FIXME("(hkey=%p,%s,%s,%p,%d) - semi-stub\n",hKey, debugstr_a(lpszSubKey), - debugstr_a(lpszValue), lpszPath, dwFlags); - - lstrcpyA(szBuff, lpszPath); - - /* FIXME: PathUnExpandEnvStringsA(szBuff); */ - - return SHSetValueA(hKey,lpszSubKey, lpszValue, REG_SZ, szBuff, - lstrlenA(szBuff)); -} - -/************************************************************************* - * SHRegSetPathW [SHLWAPI.@] - * - * See SHRegSetPathA. - */ -DWORD WINAPI SHRegSetPathW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue, - LPCWSTR lpszPath, DWORD dwFlags) -{ - WCHAR szBuff[MAX_PATH]; - - FIXME("(hkey=%p,%s,%s,%p,%d) - semi-stub\n",hKey, debugstr_w(lpszSubKey), - debugstr_w(lpszValue), lpszPath, dwFlags); - - lstrcpyW(szBuff, lpszPath); - - /* FIXME: PathUnExpandEnvStringsW(szBuff); */ - - return SHSetValueW(hKey,lpszSubKey, lpszValue, REG_SZ, szBuff, - lstrlenW(szBuff)); -} - /************************************************************************* * SHGetValueA [SHLWAPI.@] * diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index 334b5fece5..98b745c416 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -739,8 +739,8 @@ @ stdcall SHRegQueryInfoUSKeyW ( long ptr ptr ptr ptr long ) @ stdcall SHRegQueryUSValueA ( long str ptr ptr ptr long ptr long ) @ stdcall SHRegQueryUSValueW ( long wstr ptr ptr ptr long ptr long ) -@ stdcall SHRegSetPathA(long str str str long) -@ stdcall SHRegSetPathW(long wstr wstr wstr long) +@ stdcall -import SHRegSetPathA(long str str str long) +@ stdcall -import SHRegSetPathW(long wstr wstr wstr long) @ stdcall SHRegSetUSValueA ( str str long ptr long long) @ stdcall SHRegSetUSValueW ( wstr wstr long ptr long long) @ stdcall SHRegWriteUSValueA (long str long ptr long long)
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/shlwapi/reg.c | 66 --------------------------------------- dlls/shlwapi/shlwapi.spec | 4 +-- 2 files changed, 2 insertions(+), 68 deletions(-)
diff --git a/dlls/shlwapi/reg.c b/dlls/shlwapi/reg.c index 08cc26ee48..f33047ab38 100644 --- a/dlls/shlwapi/reg.c +++ b/dlls/shlwapi/reg.c @@ -47,72 +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);
-/************************************************************************* - * SHGetValueA [SHLWAPI.@] - * - * Get a value from the registry. - * - * PARAMS - * hKey [I] Handle to registry key - * lpszSubKey [I] Name of sub key containing value to get - * lpszValue [I] Name of value to get - * pwType [O] Pointer to the values type - * pvData [O] Pointer to the values data - * pcbData [O] Pointer to the values size - * - * RETURNS - * Success: ERROR_SUCCESS. Output parameters contain the details read. - * Failure: An error code from RegOpenKeyExA() or SHQueryValueExA(). - */ -DWORD WINAPI SHGetValueA(HKEY hKey, LPCSTR lpszSubKey, LPCSTR lpszValue, - LPDWORD pwType, LPVOID pvData, LPDWORD pcbData) -{ - DWORD dwRet = 0; - HKEY hSubKey = 0; - - TRACE("(hkey=%p,%s,%s,%p,%p,%p)\n", hKey, debugstr_a(lpszSubKey), - debugstr_a(lpszValue), pwType, pvData, pcbData); - - /* lpszSubKey can be 0. In this case the value is taken from the - * current key. - */ - if(lpszSubKey) - dwRet = RegOpenKeyExA(hKey, lpszSubKey, 0, KEY_QUERY_VALUE, &hSubKey); - - if (! dwRet) - { - /* SHQueryValueEx expands Environment strings */ - dwRet = SHQueryValueExA(hSubKey ? hSubKey : hKey, lpszValue, 0, pwType, pvData, pcbData); - if (hSubKey) RegCloseKey(hSubKey); - } - return dwRet; -} - -/************************************************************************* - * SHGetValueW [SHLWAPI.@] - * - * See SHGetValueA. - */ -DWORD WINAPI SHGetValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue, - LPDWORD pwType, LPVOID pvData, LPDWORD pcbData) -{ - DWORD dwRet = 0; - HKEY hSubKey = 0; - - TRACE("(hkey=%p,%s,%s,%p,%p,%p)\n", hKey, debugstr_w(lpszSubKey), - debugstr_w(lpszValue), pwType, pvData, pcbData); - - if(lpszSubKey) - dwRet = RegOpenKeyExW(hKey, lpszSubKey, 0, KEY_QUERY_VALUE, &hSubKey); - - if (! dwRet) - { - dwRet = SHQueryValueExW(hSubKey ? hSubKey : hKey, lpszValue, 0, pwType, pvData, pcbData); - if (hSubKey) RegCloseKey(hSubKey); - } - return dwRet; -} - /************************************************************************* * SHSetValueA [SHLWAPI.@] * diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index 98b745c416..ebe3058281 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -702,8 +702,8 @@ @ stdcall SHEnumValueW(long long wstr ptr ptr ptr ptr) shcore.SHEnumValueW @ stdcall SHGetInverseCMAP ( ptr long ) @ stdcall SHGetThreadRef(ptr) shcore.SHGetThreadRef -@ stdcall SHGetValueA ( long str str ptr ptr ptr ) -@ stdcall SHGetValueW ( long wstr wstr ptr ptr ptr ) +@ stdcall -import SHGetValueA (long str str ptr ptr ptr) +@ stdcall -import SHGetValueW (long wstr wstr ptr ptr ptr) @ stdcall SHIsLowMemoryMachine(long) @ stdcall SHOpenRegStream2A(long str str long) shcore.SHOpenRegStream2A @ stdcall SHOpenRegStream2W(long wstr wstr long) shcore.SHOpenRegStream2W