From 6ec108ab6e9d36081b1df0d3d4b19e9cb48e0242 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 24 Mar 2000 21:42:15 +0000 Subject: [PATCH] Moved FatalAppExit functions to win32/except.c. Added a few uses of Callout instead of referencing USER functions directly. --- misc/comm.c | 3 ++- misc/printdrv.c | 3 +-- win32/except.c | 35 ++++++++++++++++++++++++++++++++++- windows/msgbox.c | 34 ---------------------------------- 4 files changed, 37 insertions(+), 38 deletions(-) diff --git a/misc/comm.c b/misc/comm.c index 0f9bf1ee1fc..6d49786a161 100644 --- a/misc/comm.c +++ b/misc/comm.c @@ -68,6 +68,7 @@ #include "process.h" #include "winerror.h" #include "services.h" +#include "callback.h" #include "file.h" #include "debugtools.h" @@ -298,7 +299,7 @@ static void CALLBACK comm_notification( ULONG_PTR private ) /* send notifications, if any */ if (ptr->wnd && mask) { TRACE("notifying %04x: cid=%d, mask=%02x\n", ptr->wnd, cid, mask); - PostMessage16(ptr->wnd, WM_COMMNOTIFY, cid, mask); + Callout.PostMessage16(ptr->wnd, WM_COMMNOTIFY, cid, mask); } } diff --git a/misc/printdrv.c b/misc/printdrv.c index 8b19090959e..ae6b39d072f 100644 --- a/misc/printdrv.c +++ b/misc/printdrv.c @@ -603,8 +603,7 @@ INT16 WINAPI WriteDialog16(HPJOB16 hJob, LPSTR lpMsg, INT16 cchMsg) TRACE("%04x %04x '%s'\n", hJob, cchMsg, lpMsg); - nRet = MessageBox16(0, lpMsg, "Printing Error", MB_OKCANCEL); - return nRet; + return Callout.MessageBoxA(0, lpMsg, "Printing Error", MB_OKCANCEL); } diff --git a/win32/except.c b/win32/except.c index f642481a47e..c76d43880dc 100644 --- a/win32/except.c +++ b/win32/except.c @@ -31,6 +31,7 @@ #include "ntddk.h" #include "wine/exception.h" #include "ldt.h" +#include "callback.h" #include "process.h" #include "thread.h" #include "stackframe.h" @@ -92,7 +93,7 @@ DWORD WINAPI UnhandledExceptionFilter(PEXCEPTION_POINTERS epointers) sprintf( message, "Unhandled exception 0x%08lx at address 0x%08lx.", epointers->ExceptionRecord->ExceptionCode, (DWORD)epointers->ExceptionRecord->ExceptionAddress ); - MessageBoxA( 0, message, "Error", MB_OK | MB_ICONHAND ); + Callout.MessageBoxA( 0, message, "Error", MB_OK | MB_ICONHAND ); return EXCEPTION_EXECUTE_HANDLER; } @@ -110,6 +111,38 @@ LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilter( } +/************************************************************************** + * FatalAppExit16 (KERNEL.137) + */ +void WINAPI FatalAppExit16( UINT16 action, LPCSTR str ) +{ + WARN("AppExit\n"); + FatalAppExitA( action, str ); +} + + +/************************************************************************** + * FatalAppExitA (KERNEL32.108) + */ +void WINAPI FatalAppExitA( UINT action, LPCSTR str ) +{ + WARN("AppExit\n"); + Callout.MessageBoxA( 0, str, NULL, MB_SYSTEMMODAL | MB_OK ); + ExitProcess(0); +} + + +/************************************************************************** + * FatalAppExitW (KERNEL32.109) + */ +void WINAPI FatalAppExitW( UINT action, LPCWSTR str ) +{ + WARN("AppExit\n"); + Callout.MessageBoxW( 0, str, NULL, MB_SYSTEMMODAL | MB_OK ); + ExitProcess(0); +} + + /************************************************************* * WINE_exception_handler * diff --git a/windows/msgbox.c b/windows/msgbox.c index 62495c2b686..4d6db888315 100644 --- a/windows/msgbox.c +++ b/windows/msgbox.c @@ -399,37 +399,3 @@ INT WINAPI MessageBoxIndirectW( LPMSGBOXPARAMSW msgbox ) return MessageBoxIndirectA(&msgboxa); } - - -/************************************************************************** - * FatalAppExit16 (KERNEL.137) - */ -void WINAPI FatalAppExit16( UINT16 action, LPCSTR str ) -{ - WARN("AppExit\n"); - FatalAppExitA( action, str ); -} - - -/************************************************************************** - * FatalAppExit32A (KERNEL32.108) - */ -void WINAPI FatalAppExitA( UINT action, LPCSTR str ) -{ - WARN("AppExit\n"); - MessageBoxA( 0, str, NULL, MB_SYSTEMMODAL | MB_OK ); - ExitProcess(0); -} - - -/************************************************************************** - * FatalAppExit32W (KERNEL32.109) - */ -void WINAPI FatalAppExitW( UINT action, LPCWSTR str ) -{ - WARN("AppExit\n"); - MessageBoxW( 0, str, NULL, MB_SYSTEMMODAL | MB_OK ); - ExitProcess(0); -} - - -- 2.11.4.GIT