Writes data to the port.
| 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);
|
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!).
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. |