Hello ,
I've been examining compatibility of OpenWatcom C/C++ compiler with Wine. And it works just fine except one thing. So I request for your help to eliminate it, it looks easy but covers wine client/server stuff, which is not so trivial.
Watcom's getch() uses CreateFile("conin$") to get console input handle and fails with Wine :(
Here's the short code. ----------------------- CUT #include <stdio.h> #include <windows.h> int main(void) { HANDLE h; h = CreateFile( "conin$", GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0 ); printf("%X", h); fflush(NULL); return 0; } ----------------------- with Windows it works just fine, but fails with Wine - CreateFile returns invalid handle == 0xFFFFFFFF. And another thing is that the bug is not reproducible under any debugger (e.g. winedbg), the code runs just fine and createfile returns true handler.
Oleg Prokhorov wrote:
Hello ,
I've been examining compatibility of OpenWatcom C/C++ compiler with Wine. And it works just fine except one thing. So I request for your help to eliminate it, it looks easy but covers wine client/server stuff, which is not so trivial.
for this call to work correctly, you must run your app in a console. using wineconsole <yourapp> instead of wine <yourapp> should fix it
A+
Hello Eric,
Tuesday, June 3, 2003, 2:25:36 AM, you wrote:
So I request for your help to eliminate it, it looks easy but covers wine client/server stuff, which is not so trivial.
EP> for this call to work correctly, you must run your app in a console. EP> using wineconsole <yourapp> instead of wine <yourapp> should fix it
Isn't there any way to make 'wine' work also ? I've got some problems with wineconsole (latest CVS) and my Mandrake 9.1.
EP> for this call to work correctly, you must run your app in a console. EP> using wineconsole <yourapp> instead of wine <yourapp> should fix it
Isn't there any way to make 'wine' work also ?
no, wine doesn't create a win32 console (which is needed by opening conin$, which open the input of the win32 console attached to the running process). running wine simply redirects the Win32 standard handles to unix 0/1 (whatever they are) but doesn't create any console.
I've got some problems with wineconsole (latest CVS) and my Mandrake 9.1.
what type of problem ? A+
Hello Eric,
Tuesday, June 3, 2003, 2:54:46 AM, you wrote:
EP> no, wine doesn't create a win32 console (which is needed by opening EP> conin$, which open the input of the win32 console attached to the EP> running process). running wine simply redirects the Win32 standard EP> handles to unix 0/1 (whatever they are) but doesn't create any console. What's the purpose of this separated functionality ? In the other words why wine doesn't open console by default ?
I've got some problems with wineconsole (latest CVS) and my Mandrake 9.1.
EP> what type of problem ? it prints error message: err:wineconsole:WINECON_Init failed to init.
Oleg Prokhorov wrote:
Hello Eric,
Tuesday, June 3, 2003, 2:54:46 AM, you wrote:
EP> no, wine doesn't create a win32 console (which is needed by opening EP> conin$, which open the input of the win32 console attached to the EP> running process). running wine simply redirects the Win32 standard EP> handles to unix 0/1 (whatever they are) but doesn't create any console. What's the purpose of this separated functionality ? In the other words why wine doesn't open console by default ?
because some people don't want a wine console and are looking for the standard unix one instead... using wineconsole (instead of wine) is the preferred way to go
I've got some problems with wineconsole (latest CVS) and my Mandrake 9.1.
EP> what type of problem ? it prints error message: err:wineconsole:WINECON_Init failed to init.
first of all, do you have (n)curses installed ? if not, that's the issue if yes, could you send me a -debugmsg +server,+wineconsole,+console trace ? TIA
A+