Shell Ordinals
Robert Shearman
R.J.Shearman at warwick.ac.uk
Sat Jan 11 20:08:16 CST 2003
This includes a few ordinals used by explorer and desk.cpl
There seems to be a conflict between SHLocalAlloc/Free and the ordinals I
have made stubs for (on Win2k SP3 shell32.dll), but I have no way of knowing
which ordinal (if any) SHLocalAlloc/Free should be.
ChangeLog:
- Implement some PropertySheetExtArray ordinals
- Add some stubs used by explorer
Rob
-------------- next part --------------
Index: wine/dlls/shell32/shell32.spec
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shell32.spec,v
retrieving revision 1.61
diff -u -r1.61 shell32.spec
--- wine/dlls/shell32/shell32.spec 13 Dec 2002 02:17:54 -0000 1.61
+++ wine/dlls/shell32/shell32.spec 11 Jan 2003 21:07:14 -0000
@@ -178,8 +178,8 @@
197 stub SHGlobalDefect
198 stdcall SHAbortInvokeCommand () SHAbortInvokeCommand
199 stub SHGetFileIcon
- 200 stub SHLocalAlloc
- 201 stub SHLocalFree
+ @ stub SHLocalAlloc
+ @ stub SHLocalFree
202 stub SHLocalReAlloc
203 stub AddCommasW
204 stub ShortSizeFormatW
@@ -194,7 +194,7 @@
213 stub Printers_RegisterWindowW
214 stub Printers_UnregisterWindow
215 stub SHStartNetConnectionDialog at 12
- 243 stdcall @(long long) shell32_243
+ 243 stdcall @(long long) SHELL32_243
244 stdcall SHInitRestricted(ptr ptr) SHInitRestricted
247 stdcall SHGetDataFromIDListA (ptr ptr long ptr long) SHGetDataFromIDListA
248 stdcall SHGetDataFromIDListW (ptr ptr long ptr long) SHGetDataFromIDListW
@@ -411,6 +411,10 @@
@ stdcall SHGetFolderPathA(long long long long ptr)SHGetFolderPathA
@ stdcall SHGetFolderPathW(long long long long ptr)SHGetFolderPathW
@ stdcall SHGetFolderLocation(long long long long ptr)SHGetFolderLocation
+
+@ stdcall FixupOptionalComponents(long) FixupOptionalComponents
+200 stdcall SHELL32_200(ptr) SHELL32_200
+201 stdcall SHELL32_201(long) SHELL32_201
# version 6.0 (WinXP)
# _WIN32_IE >= 0x600
Index: wine/dlls/shell32/shellord.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shellord.c,v
retrieving revision 1.110
diff -u -r1.110 shellord.c
--- wine/dlls/shell32/shellord.c 16 Dec 2002 22:40:05 -0000 1.110
+++ wine/dlls/shell32/shellord.c 11 Jan 2003 21:07:16 -0000
@@ -287,17 +287,46 @@
*
* PARAMS
* hwnd [I] window handle
- * y [I] flag ????
+ * y [I] flag
*
* NOTES
* exported by ordinal
*/
BOOL WINAPI RegisterShellHook(
- HWND hWnd,
- DWORD dwType)
+ HWND hWnd,
+ DWORD dwType)
{
- FIXME("(%p,0x%08lx):stub.\n",hWnd, dwType);
- return TRUE;
+ // Undocumented functions not defined anywhere else
+ HWND WINAPI RegisterShellHookWindow(HWND);
+ HWND WINAPI SetTaskmanWindow(HWND);
+ HWND WINAPI SetProgmanWindow(HWND);
+
+ TRACE("(%p, %ld)\n",hWnd, dwType);
+ switch (dwType)
+ {
+ case 2:
+ SetProgmanWindow(hWnd);
+ RegisterShellHookWindow(hWnd);
+ break;
+ case 3:
+ SetTaskmanWindow(hWnd);
+ RegisterShellHookWindow(hWnd);
+ return FALSE;
+ break;
+ /*case 4:
+ // Overview: Seems to copy ShutDownTime value from one key to another
+ // RegOpen HKLM\System\CurrentControlSet\Control\Windows
+ // SHQueryValue ^ ShutDownTime
+ // RegClose ^
+ // RegCreate HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Volatile
+ // RegSetValueEx ShutDownTime (from above call)
+
+ break;*/
+ default:
+ FIXME("Unknown dwType = %ld\n", dwType);
+ RegisterShellHookWindow(hWnd);
+ }
+ return TRUE;
}
/*************************************************************************
* ShellMessageBoxW [SHELL32.182]
@@ -945,9 +974,9 @@
* SHWinHelp [SHELL32.127]
*
*/
-HRESULT WINAPI SHWinHelp (DWORD v, DWORD w, DWORD x, DWORD z)
-{ FIXME("0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",v,w,x,z);
- return 0;
+HRESULT WINAPI SHWinHelp (HWND hWndMain, LPWSTR lpszHelp, UINT uCommand, DWORD dwData)
+{ WARN("%p %s 0x%08ux 0x%08lx partial-stub?\n",hWndMain,debugstr_w(lpszHelp),uCommand,dwData);
+ return WinHelpW(hWndMain, lpszHelp, uCommand, dwData);
}
/*************************************************************************
* SHRunControlPanel [SHELL32.161]
@@ -1069,18 +1098,31 @@
/*************************************************************************
* ReadCabinetState [SHELL32.651] NT 4.0
*
+ * NOTES
+ * this just calls SHELL32.654 on Win2k
*/
-HRESULT WINAPI ReadCabinetState(DWORD u, DWORD v)
-{ FIXME("0x%04lx 0x%04lx stub\n",u,v);
- return 0;
+HRESULT WINAPI ReadCabinetState(BYTE * buffer, DWORD size)
+{
+ HRESULT WINAPI shell32_654 (BYTE * buffer, DWORD size);
+
+ TRACE("(%p, %ld)\n",buffer,size);
+ return shell32_654(buffer, size);
}
/*************************************************************************
* WriteCabinetState [SHELL32.652] NT 4.0
*
*/
-HRESULT WINAPI WriteCabinetState(DWORD u)
-{ FIXME("0x%04lx stub\n",u);
- return 0;
+HRESULT WINAPI WriteCabinetState(const BYTE * buffer)
+{
+ HKEY cabinetstate;
+
+ TRACE("(%p)\n",buffer);
+
+ if (RegOpenKeyExA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CabinetState", 0, KEY_SET_VALUE, &cabinetstate) != ERROR_SUCCESS)
+ return 0;
+ if (RegSetValueExA(cabinetstate, "Settings", 0, REG_BINARY, buffer, 12) != ERROR_SUCCESS)
+ return 0;
+ return 1;
}
/*************************************************************************
* FileIconInit [SHELL32.660]
@@ -1241,9 +1283,22 @@
* HCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState
* I'm (js) guessing: this one is just ReadCabinetState ;-)
*/
-HRESULT WINAPI shell32_654 (DWORD x, DWORD y)
-{ FIXME("0x%08lx 0x%08lx stub\n",x,y);
- return 0;
+HRESULT WINAPI shell32_654 (BYTE * buffer, DWORD size)
+{
+ HKEY cabinetstate;
+ DWORD type;
+ DWORD regsize = size;
+
+ TRACE("(%p, %ld)\n",buffer,size);
+
+ if (RegOpenKeyExA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CabinetState", 0, KEY_QUERY_VALUE, &cabinetstate) != ERROR_SUCCESS)
+ return 0;
+ if (RegQueryValueExA(cabinetstate, "Settings", 0, &type, buffer, ®size) != ERROR_SUCCESS)
+ return 0;
+ if ((type == REG_BINARY) && (regsize == size))
+ return 1;
+ else
+ return 0;
}
/************************************************************************
@@ -1305,9 +1360,9 @@
*
*/
-BOOL WINAPI shell32_243(DWORD a, DWORD b)
+HWND WINAPI SHELL32_243(HWND a, HWND b)
{
- return FALSE;
+ return SetShellWindowEx(a,b);
}
/*************************************************************************
@@ -1322,36 +1377,60 @@
/*************************************************************************
* SHAddFromPropSheetExtArray [SHELL32.167]
*/
-DWORD WINAPI SHAddFromPropSheetExtArray(DWORD a, DWORD b, DWORD c)
+DWORD WINAPI SHAddFromPropSheetExtArray(LPDWORD pArray, LPFNADDPROPSHEETPAGE lpfn, LPARAM lParam)
{
- FIXME("(%08lx,%08lx,%08lx)stub\n", a, b, c);
- return 0;
+ BOOL bRet = 0;
+ DWORD i;
+ IShellPropSheetExt ** pPropExt = (IShellPropSheetExt **)(pArray+2);
+ TRACE("(%p,%p,%08lx)\n", pArray, lpfn, lParam);
+
+ for (i = 0; i < *pArray; i++)
+ {
+ if (IShellPropSheetExt_AddPages(pPropExt[i], lpfn, lParam))
+ bRet = TRUE;
+ }
+ return bRet;
}
/*************************************************************************
* SHCreatePropSheetExtArray [SHELL32.168]
*/
-DWORD WINAPI SHCreatePropSheetExtArray(DWORD a, LPCSTR b, DWORD c)
+LPDWORD WINAPI SHCreatePropSheetExtArray(HKEY hkey, LPCWSTR wszRegKey, DWORD nMax)
{
- FIXME("(%08lx,%s,%08lx)stub\n", a, debugstr_a(b), c);
- return 0;
+ LPVOID pRet = LocalAlloc(0, 2*sizeof(DWORD) + nMax * sizeof(LPVOID));
+
+ FIXME("(%p,%s,%ld): stub\n", hkey, debugstr_w(wszRegKey), nMax);
+
+ ((DWORD *)pRet)[0] = 0;
+ ((DWORD *)pRet)[1] = nMax;
+ return pRet;
}
/*************************************************************************
* SHReplaceFromPropSheetExtArray [SHELL32.170]
*/
-DWORD WINAPI SHReplaceFromPropSheetExtArray(DWORD a, DWORD b, DWORD c, DWORD d)
+BOOL WINAPI SHReplaceFromPropSheetExtArray(LPDWORD pArray, UINT nPage, LPFNADDPROPSHEETPAGE lpfn, LPARAM lParam)
{
- FIXME("(%08lx,%08lx,%08lx,%08lx)stub\n", a, b, c, d);
- return 0;
+ BOOL bRet = 0;
+ DWORD i;
+ IShellPropSheetExt ** pPropExt = (IShellPropSheetExt **)(pArray+2);
+ TRACE("(%p,%d,%p,0x%08lx)\n", pArray, nPage, lpfn, lParam);
+
+ for (i = 0; i < *pArray; i++)
+ {
+ if (IShellPropSheetExt_ReplacePage(pPropExt[i], nPage, lpfn, lParam))
+ bRet = TRUE;
+ }
+ return bRet;
}
/*************************************************************************
* SHDestroyPropSheetExtArray [SHELL32.169]
*/
-DWORD WINAPI SHDestroyPropSheetExtArray(DWORD a)
+DWORD WINAPI SHDestroyPropSheetExtArray(LPVOID pArray)
{
- FIXME("(%08lx)stub\n", a);
+ TRACE("(%p)\n", pArray);
+ LocalFree(pArray);
return 0;
}
@@ -1405,4 +1484,66 @@
IEnumFORMATETC_Release(pef);
return hRes;
+}
+
+/*************************************************************************
+ * FixupOptionalComponents [SHELL32.@]
+ *
+ * PARAMETERS
+ *
+ * a - a flag (I've seen it to be 0x80000001/2)
+ */
+VOID WINAPI FixupOptionalComponents(DWORD a)
+{
+ // These don't really belong in here but I don't know where
+ // they should be and explorer 'hangs' without these
+ HANDLE hScmCreated = CreateEventA(NULL, 1, 1, "ScmCreatedEvent");
+ HANDLE hGScmCreated = CreateEventA(NULL, 1, 1, "Global\\ScmCreatedEvent");
+ FIXME("(0x%lx): stub\n", a);
+}
+
+/*************************************************************************
+ * SHELL32_200 [SHELL32.200]
+ *
+ * PARAMETERS
+ *
+ * VOID * a - Some sort of COM interface
+ *
+ * NOTES
+ *
+ * Called by Win2k Explorer on startup. Appears to create Windows needed
+ * for DDE, etc. (Ie progman, DefaultIME, Shell_view)
+ */
+VOID * WINAPI SHELL32_200(VOID * a)
+{
+ FIXME("(%p): stub\n", a);
+
+ return NULL;
+}
+
+/*************************************************************************
+ * SHELL32_201 [SHELL32.201]
+ *
+ * PARAMETERS
+ *
+ * VOID * a - Some sort of COM interface / implementation
+ * (appears to be IUnknown [only AddRef is
+ * called] + 20 DWORDS)
+ *
+ * NOTES
+ *
+ * Called by Win2k Explorer on startup. Appears to loop forever
+ * Possibly used for dispatching messages to a COM interface???
+ */
+VOID * WINAPI SHELL32_201(DWORD a)
+{
+ MSG msg;
+ FIXME("(0x%lx): stub\n", a);
+
+ while (TRUE)
+ {
+ PeekMessageW(&msg, NULL, 0, 0, 1);
+ FIXME("Don't know what to do with msg\n");
+ }
+ return NULL;
}
Index: wine/dlls/shell32/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/shell32/Makefile.in,v
retrieving revision 1.59
diff -u -r1.59 Makefile.in
--- wine/dlls/shell32/Makefile.in 9 Jan 2003 00:03:53 -0000 1.59
+++ wine/dlls/shell32/Makefile.in 11 Jan 2003 21:07:12 -0000
@@ -5,7 +5,7 @@
VPATH = @srcdir@
MODULE = shell32.dll
# fixme: avoid ole32.dll import
-IMPORTS = ole32 shlwapi comctl32 user32 gdi32 advapi32 kernel32
+IMPORTS = ole32 shlwapi comctl32 user32 gdi32 advapi32 kernel32 version
ALTNAMES = shell.dll
EXTRALIBS = $(LIBUUID) $(LIBUNICODE)
More information about the wine-patches
mailing list