Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

WaitCommEvent timeout

Posted on 1997-08-18
1
Medium Priority
?
1,663 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

597 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