Chapter 12
An application can set a variable (acceptData in the example below) that indi-
cates whether the most recent address was a match (True) or not (False): Dim acceptData as Boolean
Dim myAddress As Integer = Microsoft.VisualBasic.AscW("h")
Private Sub ErrorReceived _
(ByVal sender As Object, ByVal e As SerialErrorReceivedEventArgs)Dim SerialErrorReceived1 As SerialErrorSerialErrorReceived1 = e.EventTypeSelect Case SerialErrorReceived1Case SerialError.RXParityIf (myComPort.ReadChar = myAddress) Then
acceptData = True
Else
acceptData = False
End IfEnd Select
End Sub