The OnWrite event occurs when other application writes data to the sniffed port. (See OnWriteData event)
| OnWrite( | ||
| VARIANT* Data | ||
| ); | ||
Parameters
Data [in, out] Pointer to the VARIANT type variable that contains data written to 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_OnWrite( Data As Variant)
| ReDim Data (2) ' set new size for the data | ||
| Data (0) = 3 | ||
| Data (1) = 5 |
End Sub
See also