FtVspcWrite Function

Writes data to the port.

BOOL FtVspcWrite(
	FTVSPCHANDLE hPort,
	LPVOID lpBuffer,
	size_t cbBuffer,
	UINT BytesToWrite 
	);

Parameters

hPort

[in] Port handle. Refer to FtVspcAttach.

lpBuffer

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

cbBuffer

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

BytesToWrite

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

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, FtVspcRead