TimeOut Serial Port



 DEVELOP > c-Plus-Plus > TimeOut Serial Port

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: "Steffen"
Date: 01 Dec 2004 02:01:14 PM
Object: TimeOut Serial Port
Hello!
I'm excanging data with an microcontroller (Atmel) via the serial port.
My C++ programm is written in Microsoft Visual Studio .net (7)
I have the following problem:
If I disconnect my controller, then the programm hangs up in the following
line:
WaitCommEvent (m_hCommPort, &dwEvtMask, 0);
Of course it does - but I need to get a TimeOut. After 50 ms the function
should quit and return an timeout message.
Can anybody help me? Would really be great.
Thank you in advance!
Best regards
Steffen
.

User: "Victor Bazarov"

Title: Re: TimeOut Serial Port 01 Dec 2004 02:12:06 PM
Steffen wrote:

I'm excanging data with an microcontroller (Atmel) via the serial port.

My C++ programm is written in Microsoft Visual Studio .net (7)
I have the following problem:

If I disconnect my controller, then the programm hangs up in the following
line:
WaitCommEvent (m_hCommPort, &dwEvtMask, 0);

Of course it does - but I need to get a TimeOut. After 50 ms the function
should quit and return an timeout message.

Can anybody help me? Would really be great.

AFAICT, 'WaitCommEvent' is not a standard C++ function. Your best bet is
to ask about it in a newsgroup dedicated to your OS or your compiler. For
VC++.NET try comp.os.ms-windows.programmer.* or microsoft.public.vc.*
V
.
User: "Steffen"

Title: Re: TimeOut Serial Port 01 Dec 2004 02:28:53 PM
Thank you very much!
I will try it in an other newsgroup.
Steffen
.



  Page 1 of 1

1

 


Related Articles
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER