Virtual Serial Port ActiveX Control - WriteStr Method

The WriteStr method writes a string into serial port.

LONG WriteStr(
  BSTR Str, // data buffer

);

Parameters
  Str
    [in] The string that will be written to serial port.

Return Values
  The WriteStr function returns the number of bytes written to virtual serial port.

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

Note, that symbol with "0" code is the sign of line end, so all the data, which are sending after that symbol will be lost. That is why if your data has symbols with "0" code, please, use Write/WriteArray/Read/ReadArray methods.


See also

Read method, ReadStr method, Write method, WriteArray method