The OnRead event occurs when other application reads data from the sniffed port.(See OnReadData event)
| OnRead( | ||
| VARIANT* Data | // Pointer to the VARIANT (VT_ARRAY | VT_UI1) | |
| ); | ||
Parameters
Data [in, out] Pointer to the VARIANT type variable that contains data read from the port as VT_ARRAY | VT_UI1.
Remarks
This event is really convenient to use under VB6, C#, VB.Net. See example.
Example (VB 6.0):
Private Sub SerialPortSniffer1_OnRead( Data As Variant)
| ReDim Data (2) ' set new size for the data | ||
| Data (0) = 3 | ||
| Data (1) = 5 |
End Sub See also