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.