From: Aleksandar Andrejevic Date: Tue, 29 Oct 2013 00:10:14 +0000 (+0000) Subject: [NTVDM] X-Git-Tag: backups/0.3.17@66124~1365^2~325 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=1c1febed1727931834e7e556efada3866c44a229;hp=97acc35c7ca288646bcc725cb03401025f9598f5 [NTVDM] Save the error code returned by applications. svn path=/branches/ntvdm/; revision=60789 --- diff --git a/subsystems/ntvdm/dos.c b/subsystems/ntvdm/dos.c index 80a330dedc5..0ada9417f2e 100644 --- a/subsystems/ntvdm/dos.c +++ b/subsystems/ntvdm/dos.c @@ -28,6 +28,7 @@ static HANDLE DosSystemFileTable[DOS_SFT_SIZE]; static WORD DosSftRefCount[DOS_SFT_SIZE]; static BYTE DosAllocStrategy = DOS_ALLOC_BEST_FIT; static BOOLEAN DosUmbLinked = FALSE; +static BYTE DosErrorLevel = 0; /* PRIVATE FUNCTIONS **********************************************************/ @@ -1259,6 +1260,9 @@ Done: if (CurrentPsp == SYSTEM_PSP) VdmRunning = FALSE; } + /* Save the return code */ + DosErrorLevel = ReturnCode; + /* Return control to the parent process */ EmulatorExecute(HIWORD(PspBlock->TerminateAddress), LOWORD(PspBlock->TerminateAddress));