http://bugs.winehq.org/show_bug.cgi?id=10827
Summary: No input/output after AllocConsole Product: Wine Version: 0.9.50. Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: wine-console AssignedTo: wine-bugs@winehq.org ReportedBy: reijo.sund@helsinki.fi
Created an attachment (id=9694) --> (http://bugs.winehq.org/attachment.cgi?id=9694) pro1.c - simple source that demonstrates the AllocConsole problem
MSDN library includes sample code for console applications (http://msdn2.microsoft.com/en-us/library/aa263818.aspx). The source is available at: http://www.helsinki.fi/~sund/console_vs6.zip . The source compiles easily with winelib after --cuiexe transformations with winemaker.
The first example is about freeing and allocating a new console. These are basic operations that each reasonable console application should perform.
The problem with wine is that input and output for console are disabled after a (second) call to AllocConsole. That makes most interactive console applications unusable.
The problem can be replicated by running the sample code application with wineconsole, and by selecting the first example from the list.
To make even easier replication possible, I have attached a simple source that demonstrates the problem (works smoothly in Windows). I used the following commands to compile the attached source: export LD_LIBRARY_PATH=$WINE/library:$WINE/unicode winegcc -c -I$WINE/include -o pro1.o pro1.c winegcc -L$WINE/dlls -luser32 -lgdi32 -ladvapi32 -lkernel32 -lddraw -ldsound -lwinmm -o pro1.exe pro1.o