🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: MsgWaitForMultipleObjects

#5482
From: Tales Aguiar
Date: Tue, 09 Aug 2005 18:04
29 lines
1903 bytes
okey, you can do it, but you need know.. you will be lose some VCL features
like TThread::Sinchornize function and TApplication::OnIdle event...

    The ReadFile and WriteFile have an parameter (lpOverlapped) that you can
specity an event. When has data to read or when write operation finish this
event is signaled. Use the overlapped param to know when have data to read.
On call MsgWaitForMultipleObjects do like it...

DWORD reason = MsgWaitForMultipleObjects(1, &OverlappedStructure, false,
INFINITE, QS_ALLINPUT );

if (reason == WAIT_OBJECT_0)
    // read complete
else
if (reason == WAIT_OBJECT_0 + 1)
    Application->ProcessMessages()
else
    ...

I hope be useful,
    Sorry by my bad english

    Tales Aguiar

"tinyabs" <nospam@me.com> wrote in message
news:42f8e963@newsgroups.borland.com...
> I'm waiting on named pipe and WM messages.
>
>
Technical Details
Message-ID: <42f8f072@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <42f705fd@newsgroups.borland.com> <42f78d85$4@newsgroups.borland.com> <42f8844e@newsgroups.borland.com> <42f8df04@newsgroups.borland.com> <42f8e963@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,57e5db66437558c1
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Tales Aguiar" <tqueiroz@engesis.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <42f705fd@newsgroups.borland.com> <42f78d85$4@newsgroups.borland.com> <42f8844e@newsgroups.borland.com> <42f8df04@newsgroups.borland.com> <42f8e963@newsgroups.borland.com>
Subject: Re: MsgWaitForMultipleObjects
Date: Tue, 9 Aug 2005 15:04:23 -0300
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
NNTP-Posting-Host: 201.29.240.240
Message-ID: <42f8f072@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1123610738 201.29.240.240 (9 Aug 2005 11:05:38 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail