如题,WriteFile(m_hCom,sendBuf,dwLength,&length,&osWrite);以后length的值一直为0,这不就表示一个数据都没发出去?writefile之前调用的ClearCommError(m_hCom,&dwErrorFlags,&ComStat);dwErrorFlags的值也一直为0,我不懂这0表示什么,在线等高手解答。
解决方案 »
- windows api编程,为什么当我按下关闭按钮时会弹出2个messagebox ??
- 如何在选项卡式窗格里添加控件、、指点芐!
- VC 中如何取得子窗口的句柄和激活指定的子窗口?
- cstring的find的问题
- 如何设置clistctrl某一行的颜色
- 我在使用CreateProcess时出错了,那位大侠能帮帮我呢???100分送上!!!
- 怎样可以把html显示的内容变成纯文本?
- 如何使用快捷键?
- 求问:关于JS调用activex
- 有参加过去年IIC2000会议的么?我想了解一下相关的情况
- XP下正常,VISTA下程序退出出现(NTDLL.DLL): 0xC0000005: Access Violation的问题
- 绘图问题
lpNumberOfBytesWritten [out, optional]
A pointer to the variable that receives the number of bytes written when using a synchronous hFile parameter. WriteFile sets this value to zero before doing any work or error checking. Use NULL for this parameter if this is an asynchronous operation to avoid potentially erroneous results.This parameter can be NULL only when the lpOverlapped parameter is not NULL.For more information, see the Res section.
{
if(GetLastError()==ERROR_IO_PENDING)
GetOverlappedResult(m_hCom,&m_osWrite,&length,TRUE);
}