Solved

WaitCommEvent timeout

Posted on 1997-08-18
1
1,640 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 70 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

696 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