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?
Bye
Hi,
On Mon, May 08, 2006 at 02:27:53PM +0200, 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?
Most likely telnet.exe has some console app PE header flag set (as opposed to Win32 GUI app flag).
Probably the Wine loader needs to actually handle this flag and launch wineconsole in this case if it's not already started within a console.
Andreas
Andreas Mohr wrote:
Hi,
On Mon, May 08, 2006 at 02:27:53PM +0200, 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?
Most likely telnet.exe has some console app PE header flag set (as opposed to Win32 GUI app flag).
Probably the Wine loader needs to actually handle this flag and launch wineconsole in this case if it's not already started within a console.
The trouble is that it is already started within a console, it's just that the console isn't compatible. Most people prefer their console apps to start inside the Unix console, since that is what they expect from them. I'm afraid it's a matter of starting the program with wineconsole manually if you want the extra compatibility.
"Andreas" == Andreas Mohr andi@rhlx01.fht-esslingen.de writes:
Andreas> Hi, On Mon, May 08, 2006 at 02:27:53PM +0200, 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?
Andreas> Most likely telnet.exe has some console app PE header flag set Andreas> (as opposed to Win32 GUI app flag).
winedump dump -f telnet.exe | grep -i cui
Subsystem 0x3 (Windows CUI)
Andreas> Probably the Wine loader needs to actually handle this flag and Andreas> launch wineconsole in this case if it's not already started Andreas> within a console.
Yes. I am just fiddling around with the loader...
Bye
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?
never guess what windows explorer does in your back... - the right test sequence would be from a program where we know how CreateProcess is called - wine behaves AFAIK as windows: it only creates a console when it's asked to (either because of a specific flag in CreateProcess(), or by calling AllocConsole()).
your issue could also from a bad error / return value from GetConsoleScreenBufferInfo() when no console is attached
A+
"Eric" == Eric Pouech eric.pouech@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 wrote:
"Eric" == Eric Pouech eric.pouech@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.
but they don't clarify what happens when the parent has no console. I want to see the test program (CreateProcess with console inheritance, called from a process without any console, starting a CUI process). I'm still not sure that it will create the console.
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.
that's why we use wineconsole... wine doesn't create any console, wineconsole does...
A+