OnReadData Event in Serial Port Sniffer AX Control

The OnReadData event occurs when other application reads data from the sniffed port. (See OnRead event)  

OnReadData(
 BYTE *Buf// Pointer to the buffer
 LONG *Count// Length of the buffer that receives data
);


Parameters
  Buf     [in, out] Pointer to the buffer that contains information that has been read   Count     [in, out] Pointer to buffer length.

Remarks

Additionally you can change these values. See example.

Example:

void OnReadData (BYTE* Buf, LONG* Count)
{

 delete[] Buf ;  
 Buf = new Buf[10]; 
 FillMemory (Buf, 10, 10);  
 *Count = 10  

}


See also

OnWrite event, OnRead event, OnWriteData event