[SHELL32]: Fix a regression I introduced in r71804.

svn path=/trunk/; revision=71805
This commit is contained in:
Hermès Bélusca-Maïto 2016-07-03 23:58:37 +00:00
parent 35eeb37cd4
commit d13229363c

View file

@ -859,15 +859,18 @@ DWORD WINAPI SHRestricted (RESTRICTIONS policy)
lstrcatA(regstr, p->appstr);
/* return 0 and don't set the cache if any registry errors occur */
retval = 0;
#ifndef __REACTOS__
retval = 0;
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 = RegOpenKeyA(HKEY_LOCAL_MACHINE, regstr, &xhkey);
if (retval != ERROR_SUCCESS)
{
retval = RegOpenKeyA(HKEY_CURRENT_USER, regstr, &xhkey);
if (retval != ERROR_SUCCESS)
retval = RegOpenKeyA(HKEY_CURRENT_USER, regstr, &xhkey);
if (retval == ERROR_SUCCESS)
return 0;
}
#endif
{
if (RegQueryValueExA(xhkey, p->keystr, NULL, NULL, (LPBYTE)&retval, &datsize) == ERROR_SUCCESS)