FtVspcRead Function

Reads data from the port.

BOOL FtVspcRead(
	FTVSPCHANDLE hPort,
	LPVOID lpBuffer,
	size_t cbBuffer,
	size_t* lpNumberOfBytesRead 
	);

Parameters

hPort

[in] Port handle. Refer to FtVspcAttach.

lpBuffer

[in, out] A pointer to the buffer that receives the data.

cbBuffer

[in] Number of bytes to read from serial port (buffer size)

lpNumberOfBytesRead

[out] A pointer to the variable that receives the number of bytes read from the port.

Return Value

If the function succeeds, the return value is TRUE. Otherwise, use FtVspcGetLastError to get the error code (FtVspc_ErrorCode).

Errors

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

See Also

FtVspcAttach, FtVspcWrite