FT_Write

Supported Operating Systems by FT_Write

Linux
Mac OS X (10.4 and later)
Windows (2000 and later)
Windows CE (4.2 and later)

null

Summary  of FT_Write

Write data to the device.

Definition of FT_Write

FT_STATUS FT_Write (FT_HANDLE ftHandle, LPVOID lpBuffer, DWORD dwBytesToWrite,
LPDWORD lpdwBytesWritten)

Parameters of FT_Write

ftHandle Handle of the device.
lpBuffer Pointer to the buffer that contains the data to be written to the
device.
dwBytesToWrite Number of bytes to write to the device.
lpdwBytesWritten Pointer to a variable of type DWORD which receives the number of
bytes written to the device.

Return Value of FT_Write

FT_OK if successful, otherwise the return value is an FT error code.

Example of FT_Write

FT_HANDLE ftHandle;
FT_STATUS ftStatus;
DWORD BytesWritten;
char TxBuffer[256]; // Contains data to write to device
ftStatus = FT_Open(0, &ftHandle);
if(ftStatus != FT_OK) {
// FT_Open failed
return;
}
ftStatus = FT_Write(ftHandle, TxBuffer, sizeof(TxBuffer), &BytesWritten);
if (ftStatus == FT_OK) {
// FT_Write OK
}
else {
// FT_Write Failed
}
}
FT_Close(ftHandle);

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容