mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 22:12:05 +00:00
[KERNEL32][NTVDM]
In BaseCheckVDM, return a task ID of 0 if there is a console. In CommandThreadProc, make sure the loop executes at least once. Also, if a session ID is given, there is no parent console, so there is no need to wait for further commands. svn path=/branches/ntvdm/; revision=63124
This commit is contained in:
parent
9eeef92b34
commit
263f3da77d
2 changed files with 16 additions and 3 deletions
|
@ -401,8 +401,17 @@ BaseCheckVDM(IN ULONG BinaryType,
|
|||
CSR_CREATE_API_NUMBER(BASESRV_SERVERDLL_INDEX, BasepCheckVDM),
|
||||
sizeof(BASE_CHECK_VDM));
|
||||
|
||||
/* Write back the task ID */
|
||||
*iTask = CheckVdm->iTask;
|
||||
/* Check if there is no console */
|
||||
if (CheckVdm->ConsoleHandle == NULL)
|
||||
{
|
||||
/* Write back the task ID */
|
||||
*iTask = CheckVdm->iTask;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Otherwise, iTask should be zero */
|
||||
*iTask = 0;
|
||||
}
|
||||
|
||||
Cleanup:
|
||||
|
||||
|
|
|
@ -377,7 +377,7 @@ DWORD WINAPI CommandThreadProc(LPVOID Parameter)
|
|||
|
||||
UNREFERENCED_PARAMETER(Parameter);
|
||||
|
||||
while (AcceptCommands)
|
||||
do
|
||||
{
|
||||
/* Clear the structure */
|
||||
ZeroMemory(&CommandInfo, sizeof(CommandInfo));
|
||||
|
@ -431,6 +431,7 @@ DWORD WINAPI CommandThreadProc(LPVOID Parameter)
|
|||
|
||||
First = FALSE;
|
||||
}
|
||||
while (AcceptCommands);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -468,6 +469,9 @@ INT wmain(INT argc, WCHAR *argv[])
|
|||
{
|
||||
/* This is the session ID */
|
||||
SessionId = wcstoul(argv[i] + 2, &endptr, 10);
|
||||
|
||||
/* The VDM hasn't been started from a console, so quit when the task is done */
|
||||
AcceptCommands = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue