Get rid of the 32-bit user signal proc since we always run builtin
USER now. Moved USER module cleanups to the 16-bit signal proc.
diff --git a/windows/user.c b/windows/user.c
index e8c60ef..194233e 100644
--- a/windows/user.c
+++ b/windows/user.c
@@ -45,6 +45,28 @@
SYSLEVEL USER_SysLevel = { CRITICAL_SECTION_INIT("USER_SysLevel"), 2 };
+/* USER signal proc flags and codes */
+/* See UserSignalProc for comments */
+#define USIG_FLAGS_WIN32 0x0001
+#define USIG_FLAGS_GUI 0x0002
+#define USIG_FLAGS_FEEDBACK 0x0004
+#define USIG_FLAGS_FAULT 0x0008
+
+#define USIG_DLL_UNLOAD_WIN16 0x0001
+#define USIG_DLL_UNLOAD_WIN32 0x0002
+#define USIG_FAULT_DIALOG_PUSH 0x0003
+#define USIG_FAULT_DIALOG_POP 0x0004
+#define USIG_DLL_UNLOAD_ORPHANS 0x0005
+#define USIG_THREAD_INIT 0x0010
+#define USIG_THREAD_EXIT 0x0020
+#define USIG_PROCESS_CREATE 0x0100
+#define USIG_PROCESS_INIT 0x0200
+#define USIG_PROCESS_EXIT 0x0300
+#define USIG_PROCESS_DESTROY 0x0400
+#define USIG_PROCESS_RUNNING 0x0500
+#define USIG_PROCESS_LOADED 0x0600
+
+
/***********************************************************************
* GetFreeSystemResources (USER.284)
*/
@@ -129,26 +151,6 @@
}
-/**********************************************************************
- * USER_ModuleUnload
- */
-static void USER_ModuleUnload( HMODULE16 hModule )
-{
- /* HOOK_FreeModuleHooks( hModule ); */
- CLASS_FreeModuleClasses( hModule );
- CURSORICON_FreeModuleIcons( hModule );
-}
-
-/***********************************************************************
- * SignalProc (USER.314)
- */
-void WINAPI USER_SignalProc( HANDLE16 hTaskOrModule, UINT16 uCode,
- UINT16 uExitFn, HINSTANCE16 hInstance,
- HQUEUE16 hQueue )
-{
- FIXME_(win)("Win 3.1 USER signal %04x\n", uCode );
-}
-
/***********************************************************************
* FinalUserInit (USER.400)
*/
@@ -161,43 +163,79 @@
* SignalProc32 (USER.391)
* UserSignalProc (USER32.@)
*
- * For comments about the meaning of uCode and dwFlags
- * see PROCESS_CallUserSignalProc.
+ * The exact meaning of the USER signals is undocumented, but this
+ * should cover the basic idea:
*
+ * USIG_DLL_UNLOAD_WIN16
+ * This is sent when a 16-bit module is unloaded.
+ *
+ * USIG_DLL_UNLOAD_WIN32
+ * This is sent when a 32-bit module is unloaded.
+ *
+ * USIG_DLL_UNLOAD_ORPHANS
+ * This is sent after the last Win3.1 module is unloaded,
+ * to allow removal of orphaned menus.
+ *
+ * USIG_FAULT_DIALOG_PUSH
+ * USIG_FAULT_DIALOG_POP
+ * These are called to allow USER to prepare for displaying a
+ * fault dialog, even though the fault might have happened while
+ * inside a USER critical section.
+ *
+ * USIG_THREAD_INIT
+ * This is called from the context of a new thread, as soon as it
+ * has started to run.
+ *
+ * USIG_THREAD_EXIT
+ * This is called, still in its context, just before a thread is
+ * about to terminate.
+ *
+ * USIG_PROCESS_CREATE
+ * This is called, in the parent process context, after a new process
+ * has been created.
+ *
+ * USIG_PROCESS_INIT
+ * This is called in the new process context, just after the main thread
+ * has started execution (after the main thread's USIG_THREAD_INIT has
+ * been sent).
+ *
+ * USIG_PROCESS_LOADED
+ * This is called after the executable file has been loaded into the
+ * new process context.
+ *
+ * USIG_PROCESS_RUNNING
+ * This is called immediately before the main entry point is called.
+ *
+ * USIG_PROCESS_EXIT
+ * This is called in the context of a process that is about to
+ * terminate (but before the last thread's USIG_THREAD_EXIT has
+ * been sent).
+ *
+ * USIG_PROCESS_DESTROY
+ * This is called after a process has terminated.
+ *
+ *
+ * The meaning of the dwFlags bits is as follows:
+ *
+ * USIG_FLAGS_WIN32
+ * Current process is 32-bit.
+ *
+ * USIG_FLAGS_GUI
+ * Current process is a (Win32) GUI process.
+ *
+ * USIG_FLAGS_FEEDBACK
+ * Current process needs 'feedback' (determined from the STARTUPINFO
+ * flags STARTF_FORCEONFEEDBACK / STARTF_FORCEOFFFEEDBACK).
+ *
+ * USIG_FLAGS_FAULT
+ * The signal is being sent due to a fault.
*/
WORD WINAPI UserSignalProc( UINT uCode, DWORD dwThreadOrProcessID,
DWORD dwFlags, HMODULE16 hModule )
{
- /* FIXME: Proper reaction to most signals still missing. */
-
- switch ( uCode )
- {
- case USIG_DLL_UNLOAD_WIN16:
- case USIG_DLL_UNLOAD_WIN32:
- USER_ModuleUnload( hModule );
- break;
-
- case USIG_DLL_UNLOAD_ORPHANS:
- case USIG_FAULT_DIALOG_PUSH:
- case USIG_FAULT_DIALOG_POP:
- case USIG_THREAD_INIT:
- case USIG_THREAD_EXIT:
- case USIG_PROCESS_CREATE:
- case USIG_PROCESS_INIT:
- case USIG_PROCESS_LOADED:
- case USIG_PROCESS_RUNNING:
- case USIG_PROCESS_EXIT:
- case USIG_PROCESS_DESTROY:
- break;
-
- default:
- FIXME_(win)("(%04x, %08lx, %04lx, %04x)\n",
- uCode, dwThreadOrProcessID, dwFlags, hModule );
- break;
- }
-
+ FIXME_(win)("(%04x, %08lx, %04lx, %04x)\n",
+ uCode, dwThreadOrProcessID, dwFlags, hModule );
/* FIXME: Should chain to GdiSignalProc now. */
-
return 0;
}