Write Method

Writes data to the port.

Syntax

Visual Basic
- 
Delphi
procedure Write(DataBuffer: Integer, BytesToWrite: Integer); 
Visual C++ (MFC)
void Write(LONG DataBuffer, LONG BytesToWrite);
Visual C++ (#import)
void Write(LONG DataBuffer, LONG BytesToWrite);

Parameters

DataBuffer

[in] Buffer of characters to be written. Use type-casting to convert it from void* or char*.

BytesToWrite

[in] Number of bytes to write to serial port (in bytes!).

Errors

The method may throw exception. Use GetLastError method to get the error code.

ftvspcErrorFailed 1 The operation has not been completed.
ftvspcErrorInvalidParameter 2 Invalid parameter.

See Also

Attach, Read