The Write method writes data to virtual serial port.

LONG Write(

      BYTE* Buffer,     // data buffer

      LONG Count     // number of bytes to write




  • Buffer [in] : Pointer to the buffer containing the data to be written to the port. Count [in] Specifies the number of bytes to write to the port.

Return Values : The Write function returns the number of bytes sent to virtual serial port.

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