OnWrite Event in Serial Port Sniffer AX Control

The OnWrite event occurs when other application writes data to the sniffed port. (See OnWriteData event)  


  Data     [in, out] Pointer to the VARIANT type variable that contains data written to the port as VT_ARRAY | VT_UI1.


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

OnRead event, OnReadData event, OnWriteData event