Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You mention that you don't want to use a named pipe for internal use; it's probably worth poining out that the documentation for <a href="http://msdn.microsoft.com/en-us/library/aa365152(VS.85).aspx" rel="nofollow noreferrer">CreatePipe()</a> states, <em>"Anonymous pipes are implemented using a named pipe with a unique name. Therefore, you can often pass a handle to an anonymous pipe to a function that requires a handle to a named pipe."</em> So, I suggest that you just write a function that creates a similar pipe with the correct settings for async reading. I tend to use a GUID as a string (generated using <code>CoCreateGUID()</code> and <code>StringFromIID()</code>) to give me a unique name and then create the server and client ends of the named pipe with the correct settings for overlapped I/O (more details on this, and code, here: <a href="http://www.lenholgate.com/blog/2008/02/process-management-using-jobs-on-windows.html" rel="nofollow noreferrer">http://www.lenholgate.com/blog/2008/02/process-management-using-jobs-on-windows.html</a>).</p> <p>Once I have that I wire up some code that I have to read a file using overlapped I/O with an I/O Completion Port and, well, then I just get async notifications of the data as it arrives... However, I've got a fair amount of well tested library code in there that makes it all happen... </p> <p>It's probably possible to set up the named pipe and then just do an overlapped read with an event in your <code>OVERLAPPED</code> structure and check the event to see if data was available... I don't have any code available that does that though.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload