?
Solved

WaitCommEvent timeout

Posted on 1997-08-18
1
Medium Priority
?
1,652 Views
Last Modified: 2013-11-19
When I use the WaitCommEvent() API on non-overlapped serial operations, I get an infinite wait state whenever the event I am concerned with doesn't occur.

I am thinking if I could implement a timeout using WaitCommEvent() so that even if the event I am waiting for doesn't occur, my program will not hang and report a timeout instead.

How do I do this?  
0
Comment
Question by:booker74
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
davmarc earned 140 total points
ID: 1304163
I cannot find any direct solution.
Maybe SetCommMask() can help for a workaround because it makes WaitCommEvent() return immediately, so you install a timer that calls it after some time.
Reference: KB article Q105302.

Davide Marcato.
0

Featured Post

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Suggested Courses
Course of the Month11 days, 14 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question