全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:2888
推到 Plurk!
推到 Facebook!

有關R232的Writefile

 
m9430565
一般會員


發表:3
回覆:5
積分:6
註冊:2006-07-11

發送簡訊給我
#1 引用回覆 回覆 發表時間:2006-09-07 17:04:59 IP:59.120.xxx.xxx 未訂閱

請問各位大大:

當我使用WriteFile將資料送出去時 , 如何得知資料已經全部送出 ??

謝謝

willishung
一般會員


發表:5
回覆:5
積分:2
註冊:2006-08-01

發送簡訊給我
#2 引用回覆 回覆 發表時間:2006-09-13 10:44:29 IP:211.20.xxx.xxx 未訂閱

BOOL WriteFile(

HANDLE hFile, // handle to file to write to
LPCVOID lpBuffer, // pointer to data to write to file
DWORD nNumberOfBytesToWrite, // number of bytes to write
LPDWORD lpNumberOfBytesWritten, // pointer to number of bytes written
LPOVERLAPPED lpOverlapped // pointer to structure needed for overlapped I/O
);

Return Values

If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.

writefile 成功會回覆一個非0值給你。這樣就知道資料有沒有送出去

系統時間:2024-04-26 5:35:53
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!