Read Method in Virtual Serial Port ActiveX Control

The Read method reads data from virtual serial port input buffer.

LONG Read(
  	BYTE* Buffer , 	// data buffer
  	LONG *Count 	// number of bytes to read

Parameters :

  • Buffer [out] : Pointer to the buffer that receives the data read from the virtual serial port.
  • Count [in] : Pointer to the number of bytes to be read from the port.

Return Values : The Read function returns the number of bytes received from virtual serial port.

Note: If virtual serial port was not created, the return value is 0 (zero).