🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Response not in que?

#6457
From: Bob Gonder
Date: Mon, 09 May 2005 21:21
31 lines
2385 bytes
Neil P. wrote:

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

Have no idea why you would use that along with overlapped i/o?
If you aren't using overlapped i/o then remove it from your ReadFile()
It should be NULL unless you are using actually using it.

>Once, I detect there is something in the que, I
>use ReadFile(hComm, inbuff, nBytes, &nBytesRead, &overlapped), I am in this
>routine upto 2 times the amount of bytes coming in, using my baudrate 9600.

So, again, I'll ask...What is the value of nBytes?  Is it 1 or 2?
If you are trying to read more bytes than are available, it will wait
for more bytes to arrive (or time out after some amount of time [10
seconds? See  GetCommTimeouts() ] ).

>So I beleive there is plenty of time so that byte can be placed in the que
>buffer.

Does ReadFile() return True or False?
If False, have you checked the value of GetLastError()?


>If the unit sending the byte responds ( in a millisecond), then how long is
>it before Windows reports to the ClearCommError or to the struct_COMSTAT
>that there is a byte waiting?  Does Windows take more than a second to place
>it on the que?

I don't know, never used it, but I'd expect it to be immediate.
Technical Details
Message-ID: <ukjv71lvb2s28pvi34r21cf1loa8nsqfnv@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!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: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Response not in que?
Date: Mon, 09 May 2005 14:21:13 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <ukjv71lvb2s28pvi34r21cf1loa8nsqfnv@4ax.com>
References: <427fa27e@newsgroups.borland.com> <vugv711ona1kdbekucqqkg6csqkcd4agrd@4ax.com> <427fca8b$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.77.41.187
X-Trace: newsgroups.borland.com 1115673670 67.77.41.187 (9 May 2005 14:21:10 -0700)
Lines: 33
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail