🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #6456

Re: Response not in que?

#6456
From: Remy Lebeau (TeamB)
Date: Mon, 09 May 2005 20:57
21 lines
1765 bytes
"Neil P." <nporve01@hotmail.com> wrote in message
news:427fca8b$1@newsgroups.borland.com...

> I use ClearCommError(hComm, &dwErrorMask, & Comstat)
>
> to view what is coming in the cbInQue,

When do you call it, though?  Are you checking for errors?  Please show a
code snippet of what you are actually doing.

Rather than using ClearCommError(), why not just read immediately after
writing?  You are already expecting a byte to be written, so just read
immediately and let the reading block until the byte actually arrives.  It
also looks like you are using overlapped I/O, which played directly in my
suggestion as well, since ReadFile() will return immediately and then you
can use WaitForSingleObject() to wait for the reading to signal the event
object that you place in your OVERLAPPED structure.


Gambit
Technical Details
Message-ID: <427fce92$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <427fa27e@newsgroups.borland.com> <vugv711ona1kdbekucqqkg6csqkcd4agrd@4ax.com> <427fca8b$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,369fa724017da622
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <427fa27e@newsgroups.borland.com> <vugv711ona1kdbekucqqkg6csqkcd4agrd@4ax.com> <427fca8b$1@newsgroups.borland.com>
Subject: Re: Response not in que?
Date: Mon, 9 May 2005 13:57:24 -0700
Lines: 23
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: 68.69.17.41
Message-ID: <427fce92$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1115672210 68.69.17.41 (9 May 2005 13:56:50 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail