BOOL bDone =
ReadFile(m_hCom, //handle to file *
m_DataBuffer, //data buffer *
rst.cbInQue, //number of bytes to read * * * * * *
&factbyte, //number of bytes read
&rOverLaped);
if(! bDone && GetLastError() == ERROR_IO_PENDING)
{
if(WaitForSingleObject(rOverLaped.hEvent, 500) == WAIT_OBJECT_0)
{
bDone = GetOverlappedResult(m_hCom, &rOverLaped, &factbyte, FALSE);
}
}
win7串口可以发送数据无法接收数据
最新推荐文章于 2024-04-12 03:50:48 发布