我创建时用的属性是FILE_FLAG_OVERLAPPED,并且SetCommMask (hCom, EV_RXCHAR),
read_overlapped.hEvent = CreateEvent (NULL, TRUE, FALSE, "read");在监听串口时,用WaitCommEvent (hCom, &event_mask, &read_overlapped);
但是,总返回GetLastError() = 87,即The parameter is incorrect,可是我看不出有什么错误。各位高手有什么见解?
read_overlapped.hEvent = CreateEvent (NULL, TRUE, FALSE, "read");在监听串口时,用WaitCommEvent (hCom, &event_mask, &read_overlapped);
但是,总返回GetLastError() = 87,即The parameter is incorrect,可是我看不出有什么错误。各位高手有什么见解?
{
// Under Windows NT, this value is retured for some reason.
// I have not investigated why, but it is also a valid reply
// Also do nothing and continue.
break;
} 这是一个程序中的注释,忽略这个值。