Alexandre Julliard : kernel32: Print a nicer error message when 16-bit/ DOS apps cannot be launched.
Alexandre Julliard
julliard at winehq.org
Tue Feb 24 10:21:12 CST 2009
Module: wine
Branch: master
Commit: 3d0cf96f011f4ec5bcda8ad1ab92b4293c6a1690
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3d0cf96f011f4ec5bcda8ad1ab92b4293c6a1690
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Feb 23 17:46:50 2009 +0100
kernel32: Print a nicer error message when 16-bit/DOS apps cannot be launched.
---
dlls/kernel32/process.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index bb8c428..405bfc7 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -1048,7 +1048,18 @@ void CDECL __wine_kernel_init(void)
if (!getenv("WINEPRELOADRESERVE")) exec_process( main_exe_name );
/* if we get back here, it failed */
}
-
+ else if (error == ERROR_MOD_NOT_FOUND)
+ {
+ if ((p = strrchrW( main_exe_name, '\\' ))) p++;
+ else p = main_exe_name;
+ if (!strcmpiW( p, winevdmW ) && __wine_main_argc > 3)
+ {
+ /* args 1 and 2 are --app-name full_path */
+ MESSAGE( "wine: could not run %s: 16-bit/DOS support missing\n",
+ debugstr_w(__wine_main_wargv[3]) );
+ ExitProcess( ERROR_BAD_EXE_FORMAT );
+ }
+ }
FormatMessageA( FORMAT_MESSAGE_FROM_SYSTEM, NULL, error, 0, msg, sizeof(msg), NULL );
MESSAGE( "wine: could not load %s: %s", debugstr_w(main_exe_name), msg );
ExitProcess( error );
More information about the wine-cvs
mailing list