Marc Weustink wrote:
Vincent Snijders wrote:

Micha Nelissen wrote:

On Tue, 30 Aug 2005 11:09:30 +0200 (Romance Daylight Time)
Michael Van Canneyt <[EMAIL PROTECTED]> wrote:

In windows, it's slightly more difficult (surprise, surprise :-) )

You can use MsgWaitForMultipleObjects to do this for a windows
handle, or use WaitForSingleObject on a simple file handle.




You can't "wait" for file handles in windows.

AFAIK you can wait for file handles, but not for pipe handles.


AFAIK we wait here for pipehandles all the time


And how are you doing that?

In lazarus the following code is used (more or less):
repeat
  Windows.PeekNamedPipe(PipeHnd, nil, 0, nil, @TotalBytesAvailable, nil);
  if TotalBytesAvailable>0 then break;
  Application.ProcessMessages
  Sleep(10);
until false;

IMHO, that is not really waiting.

Vincent.

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to