Author: aandrejevic Date: Sat Apr 26 09:40:55 2014 New Revision: 62973
URL: http://svn.reactos.org/svn/reactos?rev=62973&view=rev Log: [NTVDM] DPRINT1 the error code returned by DosLoadExecutable.
Modified: branches/ntvdm/subsystems/ntvdm/dos/dos32krnl/dos.c branches/ntvdm/subsystems/ntvdm/ntvdm.c
Modified: branches/ntvdm/subsystems/ntvdm/dos/dos32krnl/dos.c URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/dos/dos32... ============================================================================== --- branches/ntvdm/subsystems/ntvdm/dos/dos32krnl/dos.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/dos/dos32krnl/dos.c [iso-8859-1] Sat Apr 26 09:40:55 2014 @@ -1283,6 +1283,7 @@ LPCSTR ProgramName, PDOS_EXEC_PARAM_BLOCK Parameters) { + DWORD Result; DWORD BinaryType; LPVOID Environment = NULL; VDM_COMMAND_INFO CommandInfo; @@ -1361,14 +1362,15 @@ GetNextVDMCommand(&CommandInfo);
/* Load the executable */ - if (DosLoadExecutable(LoadType, - AppName, - CmdLine, - Env, - &Parameters->StackLocation, - &Parameters->EntryPoint) != ERROR_SUCCESS) - { - DisplayMessage(L"Could not load '%S'", AppName); + Result= DosLoadExecutable(LoadType, + AppName, + CmdLine, + Env, + &Parameters->StackLocation, + &Parameters->EntryPoint); + if (Result != ERROR_SUCCESS) + { + DisplayMessage(L"Could not load '%S'. Error: %u", AppName, Result); break; }
Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.c URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ntvdm.c?r... ============================================================================== --- branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] Sat Apr 26 09:40:55 2014 @@ -379,6 +379,7 @@
DWORD WINAPI CommandThreadProc(LPVOID Parameter) { + DWORD Result; VDM_COMMAND_INFO CommandInfo; CHAR CmdLine[MAX_PATH]; CHAR AppName[MAX_PATH]; @@ -414,14 +415,11 @@
/* Start the process from the command line */ DPRINT1("Starting '%s'...\n", AppName); - if (DosLoadExecutable(DOS_LOAD_AND_EXECUTE, - AppName, - CmdLine, - Env, - NULL, - NULL) != ERROR_SUCCESS) - { - DisplayMessage(L"Could not start '%S'", AppName); + + Result = DosLoadExecutable(DOS_LOAD_AND_EXECUTE, AppName, CmdLine, Env, NULL, NULL); + if (Result != ERROR_SUCCESS) + { + DisplayMessage(L"Could not start '%S'. Error: %u", AppName, Result); break; }
@@ -437,6 +435,8 @@
INT wmain(INT argc, WCHAR *argv[]) { + DWORD Result; + #ifdef STANDALONE CHAR ApplicationName[MAX_PATH]; CHAR CommandLine[DOS_CMDLINE_LENGTH]; @@ -506,15 +506,17 @@ #else
/* Start the process from the command line */ - DPRINT1("Starting '%s'...\n", CommandLine); - if (DosLoadExecutable(DOS_LOAD_AND_EXECUTE, - ApplicationName, - CommandLine, - GetEnvironmentStrings(), - NULL, - NULL) != ERROR_SUCCESS) - { - DisplayMessage(L"Could not start '%S'", ApplicationName); + DPRINT1("Starting '%s'...\n", ApplicationName); + + Result = DosLoadExecutable(DOS_LOAD_AND_EXECUTE, + ApplicationName, + CommandLine, + GetEnvironmentStrings(), + NULL, + NULL); + if (Result != ERROR_SUCCESS) + { + DisplayMessage(L"Could not start '%S'. Error: %u", ApplicationName, Result); goto Cleanup; }