Removed a few Callout functions by doing a GetProcAddress at the time
we actually need the function.
diff --git a/loader/task.c b/loader/task.c
index 09213dd..a9661c4 100644
--- a/loader/task.c
+++ b/loader/task.c
@@ -1573,6 +1573,8 @@
}
+typedef INT (WINAPI *MessageBoxA_funcptr)(HWND hWnd, LPCSTR text, LPCSTR title, UINT type);
+
/**************************************************************************
* FatalAppExit16 (KERNEL.137)
*/
@@ -1582,11 +1584,19 @@
if (!pTask || !(pTask->error_mode & SEM_NOGPFAULTERRORBOX))
{
- if (Callout.MessageBoxA)
- Callout.MessageBoxA( 0, str, NULL, MB_SYSTEMMODAL | MB_OK );
- else
- ERR( "%s\n", debugstr_a(str) );
+ HMODULE mod = GetModuleHandleA( "user32.dll" );
+ if (mod)
+ {
+ MessageBoxA_funcptr pMessageBoxA = (MessageBoxA_funcptr)GetProcAddress( mod, "MessageBoxA" );
+ if (pMessageBoxA)
+ {
+ pMessageBoxA( 0, str, NULL, MB_SYSTEMMODAL | MB_OK );
+ goto done;
+ }
+ }
+ ERR( "%s\n", debugstr_a(str) );
}
+ done:
ExitThread(0xff);
}