I have an anonymous pipe, created with CreatePipe(). I want to know how the process that is writing to it can discover in advance whether the write it is about to do will block or not. Or to put it another way, how big exactly is the write buffer, and how full is it already?

Since I'm using an anonymous pipe, I can't use overlapped I/O, but I didn't want to anyway. If the pipe has insufficient space for the new message, the new message is supposed to be discarded.

Thanks in advance.