Author: hbelusca Date: Sun Jul 3 23:36:21 2016 New Revision: 71804
URL: http://svn.reactos.org/svn/reactos?rev=71804&view=rev Log: [SHELL32]: Shell policies should also read what's stored in HKEY_LOCAL_MACHINE ... Actually SHRestricted should call SHRestrictionLookup from shlwapi.dll . I think I'll have to fork this code...
Modified: trunk/reactos/dll/win32/shell32/wine/shpolicy.c
Modified: trunk/reactos/dll/win32/shell32/wine/shpolicy.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/wine/shpo... ============================================================================== --- trunk/reactos/dll/win32/shell32/wine/shpolicy.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/wine/shpolicy.c [iso-8859-1] Sun Jul 3 23:36:21 2016 @@ -860,7 +860,15 @@
/* return 0 and don't set the cache if any registry errors occur */ retval = 0; +#ifndef __REACTOS__ 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/shrestri... + retval = RegOpenKeyA(HKEY_LOCAL_MACHINE, regstr, &xhkey); + if (retval != ERROR_SUCCESS) + retval = RegOpenKeyA(HKEY_CURRENT_USER, regstr, &xhkey); + if (retval == ERROR_SUCCESS) +#endif { if (RegQueryValueExA(xhkey, p->keystr, NULL, NULL, (LPBYTE)&retval, &datsize) == ERROR_SUCCESS) {