mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTVDM] Add otya128's WineVDM integration code into ReactOS (#4113)
This is an interim solution until a more integrated solution with NTVDM is developed. CORE-17852
This commit is contained in:
parent
db810d8e44
commit
0f05abec82
1 changed files with 43 additions and 4 deletions
|
@ -796,10 +796,49 @@ WORD DosCreateProcess(IN LPCSTR ProgramName,
|
||||||
/* Those are handled by NTVDM */
|
/* Those are handled by NTVDM */
|
||||||
case SCS_WOW_BINARY:
|
case SCS_WOW_BINARY:
|
||||||
{
|
{
|
||||||
DisplayMessage(L"Trying to load '%S'.\n"
|
static const PCSTR AppName = "\"%ProgramFiles%\\otvdm\\otvdmw.exe\" ";
|
||||||
L"WOW16 applications are not supported internally by NTVDM at the moment.\n"
|
|
||||||
L"Press 'OK' to continue.",
|
STARTUPINFOA si;
|
||||||
ProgramName);
|
PROCESS_INFORMATION pi;
|
||||||
|
CHAR ExpName[MAX_PATH];
|
||||||
|
|
||||||
|
ExpandEnvironmentStringsA(AppName, ExpName, ARRAYSIZE(ExpName) - 1);
|
||||||
|
strcat(ExpName, "\""); // Add double-quote before ProgramName
|
||||||
|
strcat(ExpName, ProgramName); // Append Program name
|
||||||
|
strcat(ExpName, "\""); // Add double-quote after ProgramName
|
||||||
|
|
||||||
|
ZeroMemory(&pi, sizeof(pi));
|
||||||
|
ZeroMemory(&si, sizeof(si));
|
||||||
|
si.cb = sizeof(si);
|
||||||
|
|
||||||
|
/* Create the process */
|
||||||
|
if (CreateProcessA(NULL, // No Application Name
|
||||||
|
ExpName, // Just our Command Line
|
||||||
|
NULL, // Cannot inherit Process Handle
|
||||||
|
NULL, // Cannot inherit Thread Handle
|
||||||
|
FALSE, // No handle inheritance
|
||||||
|
0, // No extra creation flags
|
||||||
|
NULL, // No environment block
|
||||||
|
NULL, // No starting directory
|
||||||
|
&si,
|
||||||
|
&pi))
|
||||||
|
{
|
||||||
|
/* Close the handles */
|
||||||
|
CloseHandle(pi.hThread);
|
||||||
|
CloseHandle(pi.hProcess);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Retrieve the actual path to the "Program Files" directory for displaying the error */
|
||||||
|
ExpandEnvironmentStringsA("%ProgramFiles%", ExpName, ARRAYSIZE(ExpName) - 1);
|
||||||
|
|
||||||
|
DisplayMessage(L"Trying to load '%S'.\n"
|
||||||
|
L"WOW16 applications are not supported internally by NTVDM at the moment.\n"
|
||||||
|
L"Consider installing WineVDM from the ReactOS Applications Manager in\n'%S'.\n\n"
|
||||||
|
L"Click on OK to continue.",
|
||||||
|
ProgramName, ExpName);
|
||||||
|
}
|
||||||
// Fall through
|
// Fall through
|
||||||
}
|
}
|
||||||
case SCS_DOS_BINARY:
|
case SCS_DOS_BINARY:
|
||||||
|
|
Loading…
Reference in a new issue