Moved FatalAppExit functions to win32/except.c.

Added a few uses of Callout instead of referencing USER functions
directly.
This commit is contained in:
Alexandre Julliard 2000-03-24 21:42:15 +00:00
parent b52aed4e10
commit 6ec108ab6e
4 changed files with 37 additions and 38 deletions

View File

@ -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);
}
}

View File

@ -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);
}

View File

@ -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
*

View File

@ -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);
}