X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=subsystems%2Fntvdm%2Fntvdm.c;h=3576bf4182c17b2eee47f98dfb61b22dcd074eae;hp=5078c6e73c56d0c723ab81cde7e1be95b2a4d8c4;hb=9b7d069e2eda4655576313bac4f4dbca9223f940;hpb=9c142126d323af26ae772b9658c9a21063fe4ed4 diff --git a/subsystems/ntvdm/ntvdm.c b/subsystems/ntvdm/ntvdm.c index 5078c6e73c5..3576bf4182c 100644 --- a/subsystems/ntvdm/ntvdm.c +++ b/subsystems/ntvdm/ntvdm.c @@ -39,6 +39,7 @@ static HMENU hConsoleMenu = NULL; static INT VdmMenuPos = -1; static BOOLEAN ShowPointer = FALSE; +ULONG SessionId = 0; HANDLE VdmTaskEvent = NULL; /* @@ -382,6 +383,7 @@ DWORD WINAPI CommandThreadProc(LPVOID Parameter) ZeroMemory(&CommandInfo, sizeof(CommandInfo)); /* Initialize the structure members */ + CommandInfo.TaskId = SessionId; CommandInfo.VDMState = VDM_FLAG_DOS; CommandInfo.CmdLine = CmdLine; CommandInfo.CmdLen = sizeof(CmdLine); @@ -455,6 +457,20 @@ INT wmain(INT argc, WCHAR *argv[]) return 0; } +#else + INT i; + WCHAR *endptr; + + /* Parse the command line arguments */ + for (i = 1; i < argc; i++) + { + if (wcsncmp(argv[i], L"-i", 2) == 0) + { + /* This is the session ID */ + SessionId = wcstoul(argv[i] + 2, &endptr, 10); + } + } + #endif DPRINT1("\n\n\nNTVDM - Starting...\n\n\n");