On Fri, 9 Dec 2011, tcoq wrote:
I have found and tried WaitForSingleObject, using the following syntax: ThereIsACharacterToRead := WaitForSingleObject(StdInputHandle,0) = 0; While ThereIsACharacterToRead do begin aByte := InputStream.ReadByte; ThereIsACharacterToRead := WaitForSingleObject(StdInputHandle,0) = 0; end; However, WaitForSingleObject always gives back 0, meaning there should be information. My logging tells me that information arrives at least 500ms afterwards and that ReadByte waits for it. Something is not working.
I do not think this is correct if the timeout is zero. You should specify a timeout.
Michael. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal