Article View: borland.public.cppbuilder.nativeapi
Article #4748Re: GetOverlappedResult on virtual serial COM port
From: Remy Lebeau (TeamB)
Date: Tue, 29 Nov 2005 05:28
Date: Tue, 29 Nov 2005 05:28
28 lines
1929 bytes
1929 bytes
"Thom A." <thoma@gmx.at> wrote in message
news:438be379@newsgroups.borland.com...
> I do not use another wait function function before or
> after calling GetOverlappedResult().
When specifying FALSE to GetOverlappedResult(), you should be using a
separate waiting function. Otherwise, you have no way of knowing when the
operation is actually finished, or when a result is actually ready for
retrieval. In other words:
OVERLAPPED ov;
ov.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
// start an overlapped operation...
while( WaitForSingleObject(ov.hEvent, 60) == WAIT_TIMEOUT )
{
// do something else...
}
DWORD dwResult = 0;
GetOverlappedResult(FHandle, &ov, &dwResult, FALSE);
//...
Gambit
Technical Details
Message-ID:
<438be864$3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<438a0398$1@newsgroups.borland.com> <438a2209$1@newsgroups.borland.com> <438a3095$1@newsgroups.borland.com> <438b86e8$1@newsgroups.borland.com> <438be379@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 From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <438a0398$1@newsgroups.borland.com> <438a2209$1@newsgroups.borland.com> <438a3095$1@newsgroups.borland.com> <438b86e8$1@newsgroups.borland.com> <438be379@newsgroups.borland.com> Subject: Re: GetOverlappedResult on virtual serial COM port Date: Mon, 28 Nov 2005 21:28:39 -0800 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 68.69.17.41 Message-ID: <438be864$3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1133242468 68.69.17.41 (28 Nov 2005 21:34:28 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.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