Skip to content

Latest commit

 

History

History
28 lines (16 loc) · 818 Bytes

TPJPipe-ReadData.md

File metadata and controls

28 lines (16 loc) · 818 Bytes

ReadData method

Project: I/O Utility Classes

Unit: PJPipe

Class: TPJPipe

Applies to: ~>1.0

function ReadData(out Buf; const BufSize: LongWord; out BytesRead: LongWord):
  Boolean;

Description

This method reads data from the pipe into a buffer. Parameters are:

  • Buf: Buffer that receives the data from the pipe. Buf must have capacity of at least BufSize bytes.

  • BufSize: Size of the buffer or the number of bytes requested, which must be less than or equal to the size of the buffer.

  • BytesRead: Set by the method to the number of bytes actually read.

True is returned if some data was read, False if nothing was read.

An EInOutError exception is raised if there is an error peeking or reading the pipe.