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()
On Windows you can always use PeekNamedPipe, but I doubt that's what you want to do anyway.
PeekNamedPipe