I need a function called SizeOfPipe() which should return the size of a pipe - I only want to know how much data is in the pipe and not actually read data off t
SizeOfPipe()
There is no portable way to tell the amount of data coming from a pipe. The only thing you could do is to read and process data as it comes.
For that you could use something like a circular buffer