Welcome to the new DelphiDabbler Code Library Documentation.

This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.

Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.

TPJPipe class

Project: I/O Utility Classes

Unit: PJPipe

Applies to: ~>1.0


This class provides a wrapper round a Windows un-named pipe.

Pipes can be created with the desired security attributes. Pipes can also have inheritable handles to make them suitable for passing to child processes .

TPJPipe provides methods to check the number of bytes in a readable pipe, read bytes from a pipe into either a buffer or a stream and write bytes to a pipe from buffers and streams.


† Inheritable handles have a particular use in the Console Application Runner Classes for piping the output or input of console applications to and from the host application.


Method Description
AvailableDataSize Peeks the pipe to get the size of data available for reading.
CloseWriteHandle Closes the pipe’s write handle if it is open.
CopyFromStream Copies data from a stream into the pipe.
CopyToStream Copies data from the pipe to a stream.
Create Various overloaded constructors.
ReadBytes Reads data from the pipe into a byte array.
ReadData Reads data from the pipe into a buffer.
WriteBytes Writes the content of a byte array to the pipe.
WriteData Writes data from a buffer to the pipe.


Property Description
ReadHandle Windows handle used to read data from the pipe.
WriteHandle Windows handle used to write data to the pipe.


TPJPipe exposes no events.