Article View: borland.public.cppbuilder.nativeapi
Article #6180Re: Problem with serial communications
From: Martin Nijhoff
Date: Wed, 01 Jun 2005 08:02
Date: Wed, 01 Jun 2005 08:02
29 lines
2280 bytes
2280 bytes
>>Non-overlapped I/O doesn't work in WinXP. I should have added the phrase 'in my serial port component'. > What makes you think that? Because I tried it before I started messing around with overlapped I/O. When I started out, with my applications running on Win98 exclusively, I used non-overlapped I/O and it worked like a charm. Once we started using WinXP, the application locked up in the status thread (the WaitCommEvent() to be exact) and wouldn't continue unless something was received on the COM port. Some applications rely on the OnDataAvailable event, which is triggered by the status thread in response to EV_RXCHAR. As far as I know, there is no other way to get this working than with overlapped I/O (except polling the serial port, which is not an option for me). Whether I use overlapped I/O or not is not the issue. What I need advice about is which errors I need to handle, and how to handle them. Do I need to call ClearCommError() before/after the call to ReadFile() and WriteFile() to handle errors? Or is there another way to detect errors in the status thread and handle them there? WaitCommEvent() doesn't notify me of errors like CE_RXOVER or CE_TXFULL, does it? Thanks for your help sofar... Martin
Technical Details
Message-ID:
<429d6b5e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<429c30e1$1@newsgroups.borland.com> <sito91h41an986u4069q49ocejmgt29ae5@4ax.com> <429c826a$1@newsgroups.borland.com> <ch3p911icbpphbnr6cmaouk4fh1td9jcgb@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ab642e2ba4263114 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Martin Nijhoff" <dont@mail.me> Newsgroups: borland.public.cppbuilder.nativeapi References: <429c30e1$1@newsgroups.borland.com> <sito91h41an986u4069q49ocejmgt29ae5@4ax.com> <429c826a$1@newsgroups.borland.com> <ch3p911icbpphbnr6cmaouk4fh1td9jcgb@4ax.com> Subject: Re: Problem with serial communications Date: Wed, 1 Jun 2005 10:02:15 +0200 Lines: 31 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 80.100.129.156 Message-ID: <429d6b5e$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1117612894 80.100.129.156 (1 Jun 2005 01:01:34 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail