About PortController
Introduction
Purchasing PortController
Redistributing PortController
License Agreement
Support
Getting Started
How to Use PortController
Using PortController with Visual Basic
Using PortController with Visual C++
Using PortController with Delphi
How to Use Events
Handling Events in Visual Basic
Handling Events in Visual C++
Handling Events in Delphi
PortController Sample Projects
Reading and Writing Binary Data
Handling PortController Errors
Reference
Properties
BaudRate Property
Break Property
BytesUsedRQ Property
BytesUsedTQ Property
Cd Property
Cts Property
DataBits Property
Dsr Property
Dtr Property
DtrDsr Property
EnableReadOnEventChar Property
EventChar Property
Parity Property
PortHandle Property
PortName Property
Ring Property
Rts Property
RtsCts Property
StopBits Property
XonXoff Property
Methods
ClearRQ Method
ClearTQ Method
Close Method
GetErrorStatus Method
Open Method
Read Method
ReadBinary Method
Write Method
WriteBinary Method
SendXoff Method
SendXon Method
Events
BreakSignal Event
CdToggle Event
CtsToggle Event
DataReceived Event
DsrToggle Event
Error Event
EvtCharReceived Event
Ring Event
TQEmpty Event

EvtCharReceived Event

Triggered when the event character is received in the input buffer.

Syntax

Visual Basic

Private Sub PortControllerObject_EvtCharReceived(ByVal ReadBuffer As String, ByVal NumBytesRead As Long)

Visual C++

void CMyWindowName::OnEvtCharReceivedPortcontroller(LPCTSTR ReadBuffer, long NumBytesRead)

Delphi

procedure PortControllerObjectEvtCharReceived(ASender: TObject; const ReadBuffer: WideString; NumBytesRead: Integer);

Arguments

  • ReadBuffer: a C-style string that holds the data read up to the event character

  • NumBytesRead: a long integer that holds number of bytes read including the event character

Remarks

  • Setting the property EnableReadOnEventChar to true will cause all data up to and including the first occurrence of the event character in the receive queue to be read when the event character is received.

  • If the event character is received many times in quick succession, the EvtCharReceived event may not fire each time. When using this event with automatic read enabled to process incoming data, be sure to check for "stranded" data left in the receive queue after all of the EvtCharReceived events have been fired.

  • See Using PortController Events for information and instructions regarding PortController event handling.

Errors

None

See Also

EnableReadOnEventChar, Using PortController Events, Handling Events in Visual C++, Handling Events in Visual Basic, Handling Events in Delphi