It is necessary to open the channel, allocate a buffer, read data, close the channel. The usual approach based on ftell, fseek with the channel does not work: the functions return an error.
How to find out the amount of data that is in the pipe (pipe)?