ReadFile and other issues

Alexandre Julliard julliard at
Tue Aug 21 14:18:03 CDT 2001

eric pouech <eric.pouech at> writes:

> to implement properly this (mainly the ability to forward ReadFile calls
> to ReadConsole for console handles), I'd like to do the following:
> - extend the get_handle_fd to also return an id corresponding to the
> type fd being used. As of today, handle / fd relationship mainly
> assumes that we can map a Windows operation on a handle onto a similar
> operation on a unix fd. The ReadFile/ReadConsoleInput doesn't fit in 
> this category.

I'm not sure I understand you right; are you suggesting that
get_handle_fd should return an fd from which you can read input
records in the case of a console?  It would seem preferable to have
get_handle_fd simply fail with a special error code saying that the
handle is a console, and then ReadFile can fall back to using
ReadConsoleInput which doesn't require an fd at all.

> - this type of feature would help in other areas too. For example, we
> never check that Comm functions really get a Comm handle...

Well, we check by the fact that we then do a serial ioctl on the fd,
which will fail if it isn't serial. I'm not sure we need more checks.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list