Commit f7b090ae authored by Alexandre Julliard's avatar Alexandre Julliard

Fail more gracefully if 16-bit support is missing.

parent 0ba99b10
......@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = winevdm.exe
APPMODE = -mconsole
IMPORTS = winedos user32 kernel32
IMPORTS = user32 kernel32
C_SRCS = \
winevdm.c
......
......@@ -30,7 +30,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(winevdm);
extern void WINAPI wine_load_dos_exe( LPCSTR filename, LPCSTR cmdline );
static void (WINAPI *wine_load_dos_exe)( LPCSTR filename, LPCSTR cmdline );
/*** PIF file structures ***/
......@@ -384,6 +384,7 @@ int main( int argc, char *argv[] )
STARTUPINFOA info;
char *cmdline, *appname, **first_arg;
char *p;
HMODULE winedos;
if (!argv[1]) usage();
......@@ -396,13 +397,20 @@ int main( int argc, char *argv[] )
{
if (!SearchPathA( NULL, argv[1], ".exe", sizeof(buffer), buffer, NULL ))
{
WINE_MESSAGE( "winevdm: can't exec '%s': file not found\n", argv[1] );
WINE_MESSAGE( "winevdm: unable to exec '%s': file not found\n", argv[1] );
ExitProcess(1);
}
appname = buffer;
first_arg = argv + 1;
}
if (!(winedos = LoadLibraryA( "winedos.dll" )) ||
!(wine_load_dos_exe = (void *)GetProcAddress( winedos, "wine_load_dos_exe" )))
{
WINE_MESSAGE( "winevdm: unable to exec '%s': 16-bit support missing\n", argv[1] );
ExitProcess(1);
}
if (*first_arg) first_arg++; /* skip program name */
cmdline = build_command_line( first_arg );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment