Who is responsible to start up a Wineconsole
Uwe Bonnes
bon at elektron.ikp.physik.tu-darmstadt.de
Mon May 8 10:21:15 CDT 2006
>>>>> "Eric" == Eric Pouech <eric.pouech at wanadoo.fr> writes:
Eric> Uwe Bonnes wrote:
>> Hallo,
>>
>> on XP, Program->Execute->(../system32/)telnet.exe starts up a
>> Console. "wine telnet.exe" on the command line however silently
>> terminates, as the call to GetConsoleScreenBufferInfo returns an
>> empty LPCONSOLE_SCREEN_BUFFER_INFO structure.
>>
>> Shouldn't wine start up some wineconsole in that circumstances as XP
>> does?
Eric> never guess what windows explorer does in your back... - the
Eric> right test sequence would be from a program where we know how
Eric> CreateProcess is called - wine behaves AFAIK as windows: it only
Eric> creates a console when it's asked to (either because of a specific
Eric> flag in CreateProcess(), or by calling AllocConsole()).
MSDN tells for AllocConsole that Console Application (CUI) are initialized
with a console (preloaded), unless they are created as a detached process.
If I understand the wine loader right, and didn't overlook something in the
relay log, the initial wine process doesn't start the first process by a
CreateProcess call. So no chance to fiddle withe the flags.
Shouldn't something like appended patch be comitted? The loader will check
for the CUI flag and allocate a Console, if needed.
Eric> your issue could also from a bad error / return value from
Eric> GetConsoleScreenBufferInfo() when no console is attached
Bye
--
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: wine/dlls/kernel/process.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/process.c,v
retrieving revision 1.137
diff -u -5 -r1.137 process.c
--- wine/dlls/kernel/process.c 7 Apr 2006 10:05:39 -0000 1.137
+++ wine/dlls/kernel/process.c 8 May 2006 15:16:12 -0000
@@ -760,10 +760,12 @@
if (!params->hStdError)
params->hStdError = INVALID_HANDLE_VALUE;
else if (VerifyConsoleIoHandle(console_handle_map(params->hStdError)))
params->hStdError = console_handle_map(params->hStdError);
+ /* The starting process should get a new console, if it is a CUI application*/
+ params->ConsoleHandle = (HANDLE)1; /*FIXME*/
return TRUE;
}
/***********************************************************************
More information about the wine-devel
mailing list