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

GetErrorStatus Method

Returns and clears the state of all incoming status lines.

Syntax

Visual Basic

object.GetErrorStatus ParityError, FramingError, OverrunError

Visual C++

object.GetErrorStatus(long &ParityError, long &FramingError, long &OverrunError)

Delphi

object.GetErrorStatus(out ParityError: Integer; out FramingError: Integer; out OverrunError: Integer)

Part Description
object An object expression that evaluates to a PortController object.
ParityError A long value that indicates if a parity error has occurred (0 = FALSE).
FramingError A long value that indicates if a framing error has occurred (0 = FALSE).
OverrunError A long value that indicates if a overrun error has occurred (0 = FALSE).

Example

Visual Basic

Dim ParityError As Long
Dim FramingError As Long
Dim OverrunError As Long

myPortController.GetErrorStatus ParityError, FramingError, OverrunError

Visual C++

long lParityError, lFramingError, lOverrunError;
m_myPortController.GetErrorStatus(&lParityError, &lFramingError, &lOverrunError);

Delphi

var iParityError, iFramingError, iOverrunError: Integer;   // declare variable in the proper place
myPortController.GetErrorStatus(iParityError, iFramingError, iOverrunError);

Remarks

Calling this method automatically clears any error state after the error information is returned.

Returns

The long values ParityError, FramingError, and OverrunError by reference where 0 is false and a non-zero value is true.

Errors

Calling the GetErrorStatus method while the port is closed is not permitted and will cause PortController to throw a "Port is closed" exception.

See Also

Error Event