🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: GetOverlappedResult on virtual serial COM port

#4832
From: Thom A.
Date: Sun, 27 Nov 2005 22:19
27 lines
2322 bytes
>>          while(!GetOverlappedResult(FHandle,&WRITE_OS, &dwBytesWritten,
>> TRUE ))
>>          {
>>             dwError = GetLastError();
>>             if(dwError == ERROR_IO_INCOMPLETE)
>>             {
> 
> 
> If I'm not mistaken, specifying TRUE as the last parameter of 
> GetOverlappedResult() means the function is waiting for the operation to 
> be completed. In this case, there is no need to test the result against 
> ERROR_IO_INCOMPLETE as this can't happen.


I would prefer to specify FALSE as the last parameter - this would 
definitely speed things up enormously! Therefore, I have left the 
ERROR_IO_INCOMPLETE check in the routine - after all, I can remove it at 
any time later!

Unfortunately, specifying FALSE does not always work with virtual ports: 
This returns error in some cases, in works in others...

I would love to have an automatic selection somethere between TRUE and 
FALSE. (Okay, this sounds strange, even to me!) My goal is to achieve 
response times of less than 300 ms. FALSE is much faster, but keeps 
failing from time to time; TRUE is much slower and needs from the usual 
3 seconds up to 14 seconds in rare cases (for a single port scan!)
Technical Details
Message-ID: <438a3095$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <438a0398$1@newsgroups.borland.com> <438a2209$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,14a3bc55bdb22e73
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Sun, 27 Nov 2005 23:19:00 +0100
From: "Thom A." <thoma@gmx.at>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041217
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: GetOverlappedResult on virtual serial COM port
References: <438a0398$1@newsgroups.borland.com> <438a2209$1@newsgroups.borland.com>
In-Reply-To: <438a2209$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 84.166.243.130
Message-ID: <438a3095$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1133129877 84.166.243.130 (27 Nov 2005 14:17:57 -0700)
Lines: 28
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail