I have code that already handles reading the pipe in a loop correctly and that code has to happen at a particular time in my program. I would like to avoid reorganizing the actual reading process, but I still need to be able to get signals whenever a pipe becomes ready. From what I can tell after ten minutes of browsing around the only way to do this is to call ReadFile and pass it an OVERLAPPED struct. This way I can get it to signal an event and I can call WaitOnMultipleObjects to know when something is ready on the pipe.
However, as far as I can tell, this means it will also interfere with the existing and somewhat intricate read process. I was hoping I could just ReadFile with a size of zero or something, but the docs don't say anything about it, can anyone out there help me?