Implementation of 2 Win98 by-ordinal SHELL32 routines. Helps Win98
Explorer work better.
diff --git a/dlls/shell32/shell32.spec b/dlls/shell32/shell32.spec
index 3500769..022593a 100644
--- a/dlls/shell32/shell32.spec
+++ b/dlls/shell32/shell32.spec
@@ -248,8 +248,8 @@
240 stub SHEmptyRecycleBinA@12 # exported by name
241 stub SHEmptyRecycleBinW@12 # exported by name
242 stdcall SHFileOperation (ptr) SHFileOperationAW # exported by name
- 243 stdcall SHFileOperationA (ptr) SHFileOperationA # exported by name
- 244 stdcall SHFileOperationW (ptr) SHFileOperationW # exported by name
+ 243 stdcall shell32_243(long long) shell32_243
+ 244 stdcall SHInitRestricted(ptr ptr) SHInitRestricted # win98+ only, by ordinal
245 stub SHFormatDrive@16 # exported by name
246 stub SHFreeNameMappings@4 # exported by name
247 stdcall SHGetDataFromIDListA (ptr ptr long ptr long) SHGetDataFromIDListA
@@ -387,3 +387,8 @@
1221 stdcall SHGetSpecialFolderPathA(long ptr long long) SHGetSpecialFolderPathA # win98:292
1222 stdcall DoEnvironmentSubstA (str str) DoEnvironmentSubstA # win98:293
1223 stdcall DoEnvironmentSubstW (wstr wstr) DoEnvironmentSubstW # win98:204
+
+# by-name routines relocated in win98
+
+1224 stdcall SHFileOperationA (ptr) SHFileOperationA # exported by name
+1225 stdcall SHFileOperationW (ptr) SHFileOperationW # exported by name
\ No newline at end of file
diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c
index e0ca91e..c7a27b3 100644
--- a/dlls/shell32/shellord.c
+++ b/dlls/shell32/shellord.c
@@ -20,6 +20,10 @@
DEFAULT_DEBUG_CHANNEL(shell)
+/* shell policy data */
+#define SHELL_MAX_POLICIES 57 /* number in Win98 */
+unsigned long shell_policies[SHELL_MAX_POLICIES];
+
/*************************************************************************
* SHChangeNotifyRegister [SHELL32.2]
*
@@ -362,6 +366,57 @@
}
/*************************************************************************
+ * SHInitRestricted [SHELL32.244]
+ *
+ * Win98+ by-ordinal only routine called by Explorer and MSIE 4 and 5.
+ *
+ * INPUTS
+ * Two inputs: one is a string or NULL. If non-NULL the pointer
+ * should point to a string containing the following exact text:
+ * "Software\Microsoft\Windows\CurrentVersion\Policies".
+ * The other input is unused.
+ *
+ * NOTES
+ * If the input is non-NULL and does not point to a string containing
+ * that exact text the routine will do nothing.
+ *
+ * If the text does match or the pointer is NULL, then the routine
+ * will init SHRestricted()'s policy table to all 0xffffffff and
+ * returns 0xffffffff as well.
+ *
+ * I haven't yet run into anything calling this with inputs other than
+ * (NULL, NULL), so I may have the inputs reversed.
+ */
+
+BOOL WINAPI SHInitRestricted(LPSTR inpRegKey, LPSTR parm2)
+{
+ int i;
+
+ TRACE("(%p, %p)\n", inpRegKey, parm2);
+
+ /* first check - if input is non-NULL and points to the secret
+ key string, then pass. Otherwise return 0.
+ */
+
+ if (inpRegKey != (LPSTR)NULL)
+ {
+ if (lstrcmpiA(inpRegKey, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies"))
+ {
+ /* doesn't match, fail */
+ return 0;
+ }
+ }
+
+ /* check passed, init all policy table entries with 0xffffffff */
+ for (i = 0; i < SHELL_MAX_POLICIES; i++)
+ {
+ shell_policies[i] = 0xffffffff;
+ }
+
+ return 0xffffffff;
+}
+
+/*************************************************************************
* SHCreateDirectory [SHELL32.165]
*
* NOTES
@@ -1319,3 +1374,15 @@
return DoEnvironmentSubstA(x, y);
}
+/*************************************************************************
+ * shell32_243 [SHELL32.243]
+ *
+ * Win98+ by-ordinal routine. In Win98 this routine returns zero and
+ * does nothing else. Possibly this does something in NT or SHELL32 5.0?
+ *
+ */
+
+BOOL WINAPI shell32_243(DWORD a, DWORD b)
+{
+ return FALSE;
+}