mirror of
https://github.com/reactos/reactos.git
synced 2024-08-01 09:01:13 +00:00
[NTVDM]
DPRINT1 the error code returned by DosLoadExecutable. svn path=/branches/ntvdm/; revision=62973
This commit is contained in:
parent
e5df0c4dfe
commit
2e1e346378
|
@ -1283,6 +1283,7 @@ WORD DosCreateProcess(DOS_EXEC_TYPE LoadType,
|
|||
LPCSTR ProgramName,
|
||||
PDOS_EXEC_PARAM_BLOCK Parameters)
|
||||
{
|
||||
DWORD Result;
|
||||
DWORD BinaryType;
|
||||
LPVOID Environment = NULL;
|
||||
VDM_COMMAND_INFO CommandInfo;
|
||||
|
@ -1361,14 +1362,15 @@ WORD DosCreateProcess(DOS_EXEC_TYPE LoadType,
|
|||
GetNextVDMCommand(&CommandInfo);
|
||||
|
||||
/* Load the executable */
|
||||
if (DosLoadExecutable(LoadType,
|
||||
Result= DosLoadExecutable(LoadType,
|
||||
AppName,
|
||||
CmdLine,
|
||||
Env,
|
||||
&Parameters->StackLocation,
|
||||
&Parameters->EntryPoint) != ERROR_SUCCESS)
|
||||
&Parameters->EntryPoint);
|
||||
if (Result != ERROR_SUCCESS)
|
||||
{
|
||||
DisplayMessage(L"Could not load '%S'", AppName);
|
||||
DisplayMessage(L"Could not load '%S'. Error: %u", AppName, Result);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -379,6 +379,7 @@ VOID ConsoleCleanup(VOID)
|
|||
|
||||
DWORD WINAPI CommandThreadProc(LPVOID Parameter)
|
||||
{
|
||||
DWORD Result;
|
||||
VDM_COMMAND_INFO CommandInfo;
|
||||
CHAR CmdLine[MAX_PATH];
|
||||
CHAR AppName[MAX_PATH];
|
||||
|
@ -414,14 +415,11 @@ DWORD WINAPI CommandThreadProc(LPVOID Parameter)
|
|||
|
||||
/* 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)
|
||||
|
||||
Result = DosLoadExecutable(DOS_LOAD_AND_EXECUTE, AppName, CmdLine, Env, NULL, NULL);
|
||||
if (Result != ERROR_SUCCESS)
|
||||
{
|
||||
DisplayMessage(L"Could not start '%S'", AppName);
|
||||
DisplayMessage(L"Could not start '%S'. Error: %u", AppName, Result);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -437,6 +435,8 @@ DWORD WINAPI CommandThreadProc(LPVOID Parameter)
|
|||
|
||||
INT wmain(INT argc, WCHAR *argv[])
|
||||
{
|
||||
DWORD Result;
|
||||
|
||||
#ifdef STANDALONE
|
||||
CHAR ApplicationName[MAX_PATH];
|
||||
CHAR CommandLine[DOS_CMDLINE_LENGTH];
|
||||
|
@ -506,15 +506,17 @@ INT wmain(INT argc, WCHAR *argv[])
|
|||
#else
|
||||
|
||||
/* Start the process from the command line */
|
||||
DPRINT1("Starting '%s'...\n", CommandLine);
|
||||
if (DosLoadExecutable(DOS_LOAD_AND_EXECUTE,
|
||||
DPRINT1("Starting '%s'...\n", ApplicationName);
|
||||
|
||||
Result = DosLoadExecutable(DOS_LOAD_AND_EXECUTE,
|
||||
ApplicationName,
|
||||
CommandLine,
|
||||
GetEnvironmentStrings(),
|
||||
NULL,
|
||||
NULL) != ERROR_SUCCESS)
|
||||
NULL);
|
||||
if (Result != ERROR_SUCCESS)
|
||||
{
|
||||
DisplayMessage(L"Could not start '%S'", ApplicationName);
|
||||
DisplayMessage(L"Could not start '%S'. Error: %u", ApplicationName, Result);
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue