Reads array of data from the port.
| Visual Basic | Function ReadArray(DataBuffer As Byte, BytesToRead As Long) As Long
|
|---|---|
| Delphi | function ReadArray(var DataBuffer: array of Byte, BytesToRead: Integer): Integer;
|
| Visual C++ (MFC) | long ReadArray(VARIANT *DataBuffer, long BytesToRead);
|
| Visual C++ (#import) | long ReadArray(VARIANT *DataBuffer, long BytesToRead);
|
DataBuffer
[out] The buffer that receives the data.
BytesToRead
[in] Number of bytes to read from the port.
Number of bytes read.
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. |