<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type><BASE
href="x-msg://6255/">
<META name=GENERATOR content="MSHTML 8.00.6001.19190">
<STYLE></STYLE>
</HEAD>
<BODY
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"
bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Hello Marc.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial> In Windows the ReadFile function
reads asynchronously:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV><FONT size=2 face=Arial>
<DIV>1) from a pipe, setting <FONT color=#2a2a2a>PIPE_NOWAIT via the
SetNamedPipeHandleState function (see <A
href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa365787(v=vs.85).aspx"><FONT
size=3
face="Times New Roman">http://msdn.microsoft.com/en-us/library/windows/desktop/aa365787(v=vs.85).aspx</FONT></A>);</FONT></DIV>
<DIV> </DIV>
<DIV>2) from a file, setting FILE_FLAG_OVERLAPPED via the CreateFile function
(see <A
href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx</A>);
</FONT><FONT size=2 face=Arial><FONT size=2 face=Arial>anyway, see <A
href="http://support.microsoft.com/kb/156932/en-us">http://support.microsoft.com/kb/156932/en-us</A> for
some problems you have to deal with when using this feature (but at
the end everything always worked fine for me from disks and serial or USB
ports);</FONT></DIV>
<DIV> </DIV></FONT>
<DIV><FONT face=Arial><FONT size=2>3) from a socket, using the usual ReadFile
function on a socket handle (see </FONT><A
href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa365467(v=vs.85).aspx"><FONT
size=2>http://msdn.microsoft.com/en-us/library/windows/desktop/aa365467(v=vs.85).aspx</FONT></A><FONT
size=2>); but it sounds new for Windows, at least for me: I'll try it one day
(please, let me know if it worked for you).</FONT></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#2a2a2a size=2 face=Arial>Hope this helps.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial> Renato MAURO</FONT></DIV>
<DIV> </DIV></BODY></HTML>