Get number of bytes available in PeekNamedPipe (take 2)

Alexandre Julliard julliard at
Wed Jul 24 19:21:41 CDT 2002

Uwe Bonnes <bon at> writes:

> As I don't have a test target, I don't feel yet like filling lpvBuffer and I
> don't yet have an idea how to do that. I looked at the kernel sources and
> lseek unconditionally returns error on pipe. So how can we read the pipe and
> get the filepointer back to the original position afterwards? 

You can't use lseek, you have to make the pipe a socket pair and use

> 	wine/server/protocol.def
> 	Define a FD_TYPE_PIPE
> 	wine/server/file.c: get_handle_fd
> 	On type FD_TYPE_PIPE check other end of type

If this is really necessary it should be done on the client side. I'm
not sure I see the point though.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list