ThbComPort.Read
Unit: hbComm
 

Reads data from the input buffer. This method reads a maximum of BufferSize bytes of data into the Buffer variable. The bytes are read directly from the devices input buffer using the ReadFile function.

Declaration

function Read(var Buffer; BufferSize: Integer): Integer;

Parameters

Buffer
Memory buffer to receive data. Must be large enough to hold BufferSize bytes.
BufferSize
Size of Buffer and maximum number of bytes to read from the input buffer.

Return Values

The Read function returns the number of bytes read from the communications port.

See Also

ThbComPort.InBuffer, ThbComPort.ReadStr