This function reads the contents of the pipe, one entry at a time. The pipe must be open before it can be read. CLPipeRead will first do a DOSPeekNPipe call and then read the pipe if the character count is not zero. CLPeekPipe should be used to check if any data is available before a CLReadPipe command. See CLOpenPipe and CLPeekPipe for details.
The command is as follows:
rc = CLReadPipe( '0' )
The return value rc is made up of the following information: piperr
charcount replypacket
Piperr is any possible error the read pipe command may have caused.
If the character count is zero, the piperr returns the value of DOSPeekNPipe.
If the character count is not zero, piperr returns whatever the DosRead
returns which can be the following values:
0 NO_ERROR
5 ERROR_ACCESS_DENIED
6 ERROR_INVALID_HANDLE
26 ERROR_NOT_DOS_DISK
33 ERROR_LOCK_VIOLATION
109 ERROR_BROKEN_PIPE
234 ERROR_MORE_DATA
charcount is the character count of the data just read from the pipe.
replypacket is the reply the Comm Engine returns in response to one of the commands as listed under Comm Engine Function Description.
Example read from pipe. Command:
rc = CLReadPipe( '0' )
Contents of rc:
0 12 {0 }CONNECT
There were 12 characters read from the pipe which corresponds
to the data displayed from the opening curly bracket to the T in
CONNECT. (There are two spaces between the brackets).