From ea3e66d748cf1970d754d97494f21f288a3005d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Mon, 10 Jan 2022 20:17:08 +0100 Subject: [PATCH] [SHELL32:WINE] Improve ROS-specific registry opening in SHRestricted() (#4275) --- dll/win32/shell32/wine/shpolicy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/win32/shell32/wine/shpolicy.c b/dll/win32/shell32/wine/shpolicy.c index 85e33e6ea39..1300a2e7aa9 100644 --- a/dll/win32/shell32/wine/shpolicy.c +++ b/dll/win32/shell32/wine/shpolicy.c @@ -1377,10 +1377,10 @@ DWORD WINAPI SHRestricted (RESTRICTIONS policy) if (RegOpenKeyA(HKEY_CURRENT_USER, regstr, &xhkey) == ERROR_SUCCESS) #else // FIXME: Actually this *MUST* use shlwapi!SHRestrictionLookup() // See http://www.geoffchappell.com/studies/windows/shell/shell32/api/util/shrestricted.htm - retval = RegOpenKeyA(HKEY_LOCAL_MACHINE, regstr, &xhkey); + retval = RegOpenKeyExA(HKEY_LOCAL_MACHINE, regstr, 0, KEY_READ, &xhkey); if (retval != ERROR_SUCCESS) { - retval = RegOpenKeyA(HKEY_CURRENT_USER, regstr, &xhkey); + retval = RegOpenKeyExA(HKEY_CURRENT_USER, regstr, 0, KEY_READ, &xhkey); if (retval != ERROR_SUCCESS) return 0; }