* NOTES
* Exported by ordinal.
* This function caches the retrieved values to prevent unnecessary registry access,
- * if SHInitRestricted() was previously called.
+ * if SHSettingsChanged() was previously called.
*
* REFERENCES
* a: MS System Policy Editor.
}
lstrcpyA(regstr, strRegistryPolicyA);
+ lstrcatA(regstr, "\\");
lstrcatA(regstr, p->appstr);
/* return 0 and don't set the cache if any registry errors occur */
+#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);
+ 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)
{
}
/*************************************************************************
- * SHInitRestricted [SHELL32.244]
+ * SHSettingsChanged [SHELL32.244]
*
* Initialise the policy cache to speed up calls to SHRestricted().
*
* NOTES
* Exported by ordinal. Introduced in Win98.
*/
-BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey)
+BOOL WINAPI SHSettingsChanged(LPCVOID unused, LPCVOID inpRegKey)
{
TRACE("(%p, %p)\n", unused, inpRegKey);