TApxComPort.InBuffUsed

TApxComPort

property InBuffUsed : Word

Returns the number of bytes currently available for reading from the dispatcher buffer.

This routine returns the number of bytes currently loaded in the Async Professional CLX dispatcher buffer. It does not include bytes in the communications driver input buffer that haven't yet been moved to the dispatcher buffer.

Because the dispatcher automatically drains the buffer using timer and notification messages, this buffer's status is rarely relevant to the program.

The following example checks InBuffUsed to see if received data is available for processing:

if ApxComPort.InBuffUsed <> 0 then
  ...process data

See also: CharReady, InBuffFree