Read Method
Reads data from the port.
Syntax
Visual Basic | - |
---|---|
Delphi | function Read(DataBuffer: OleVariant, BytesToRead: Integer): Integer; |
Visual C++ (MFC) | LONG Read(VARIANT * DataBuffer, LONG BytesToRead); |
Visual C++ (#import) | LONG Read(VARIANT * DataBuffer, LONG BytesToRead); |
Parameters
DataBuffer
[in, out] The buffer that receives the data.
BytesToRead
[in] Variable that receives the number of bytes read from port.
Return
Number of bytes read.
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. |