On 20 May 2010 10:28, Hartmut Eilers <hart...@eilers.net> wrote: > Hallo Henry, > > thank you for your fast response. > Sorry to say, that I don't understand what you suggest. > Could you explain it a bit more ?
SelectText monitors a file descriptor for input (or output) to become ready for up to the timeout you specify. You can probably get the same effect on win32 by opening the file specifying an overlapped structure, which will enable you to do async i/o. The a call to readfile will return immediately, at which point you can call WaitForSingleObject with a timeout. You can check the result to see if anything was read during the timeout specified. More info here: http://msdn.microsoft.com/en-us/library/ms686358%28v=VS.85%29.aspx If you have other calls to select (on file descriptors), you might want to consider using something like libevent, which solves these things in a cross platform way. Or if you're brave you can look at cygwin's implementation of select ( http://www.cygwin.com/cygwin-ug-net/highlights.html#ov-hi-select ). Henry _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal