I have a problem with readfile function. I'm using it to read data from an anonymous pipe.I use it in a loop, that breaks when there's no more data(like icz tute). But i've got a strange problem because readfile after some iterations doesm't' return(maybe because the program at the other end of the pipe closed). Do you know a way to know if a pipe is still active or to resoolve the situation? Thanks
Posted on 2001-04-04 15:21:00 by /*mi*/
Are you using overlapped I/O ? If not then ReadFile will hang if there is no data, if you're using non-overlapped I/O then you should use PeekNamedPipe before you read, to make sure there is data there. Umbongo
Posted on 2001-04-05 10:43:00 by umbongo
i had the exact same problem a while ago, but i forgot how i solved it :\ post your code and maybe we can spot the problem.
Posted on 2001-04-05 10:46:00 by fresh