🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #400

Re: Getting ADO events in a DLL???

#400
From: s.kenwrick
Date: Wed, 18 Oct 2006 08:44
23 lines
2240 bytes
Thanks for the response it was very helpful,  however it was only a
partial success.      The OnWillConnect event handler was triggered,
but not the OnConnectComplete event handler.    In fact I found that
all event handlers that are triggered by actual windows messages are
not being called.

It turns out that the reason for this is that I am calling the DLL
functions from a background thread.             I have a CBUILDER GUI
application that loads a set of DLLs then spawns a second thread,  and
it is this second thread that is calling the DLL functions that
attempts to create the ADOConnection etc..

If I run your code from the main thread it all works fine,  if I run
your code from the other thread it does not trigger the event handlers
(I guess that the windows messages are being directed to the main
thread and not the secondary thread).

Is there a way I can tell VCL to direct messages to the secondary
thread and thus trigger these event handlers?

Thanks
Sean
Technical Details
Message-ID: <1161161044.174215.269230@k70g2000cwa.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!k70g2000cwa.googlegroups.com!not-for-mail
References: <1161099090.459997.102700@m7g2000cwm.googlegroups.com> <453501c8$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,b68f8160aec90a52
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!k70g2000cwa.googlegroups.com!not-for-mail
From: s.kenwrick@btinternet.com
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Re: Getting ADO events in a DLL???
Date: 18 Oct 2006 01:44:04 -0700
Organization: http://groups.google.com
Lines: 24
Message-ID: <1161161044.174215.269230@k70g2000cwa.googlegroups.com>
References: <1161099090.459997.102700@m7g2000cwm.googlegroups.com>
   <453501c8$1@newsgroups.borland.com>
NNTP-Posting-Host: 86.146.221.59
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1161161049 25786 127.0.0.1 (18 Oct 2006 08:44:09 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 18 Oct 2006 08:44:09 +0000 (UTC)
In-Reply-To: <453501c8$1@newsgroups.borland.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.0.2; FDM),gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: k70g2000cwa.googlegroups.com; posting-host=86.146.221.59;
   posting-account=yWLP7w0AAACaPihRkBtT0_EvcWbbMTaJ