Article View: borland.public.cppbuilder.nativeapi
Article #2636Re: Callback, Dll, Thread and synchronization HELP!
From: Remy Lebeau (TeamB)
Date: Wed, 07 Feb 2007 21:13
Date: Wed, 07 Feb 2007 21:13
27 lines
1736 bytes
1736 bytes
"Stefano Bonifazi" <stefboombastic@email.it> wrote in message news:45ca373c$1@newsgroups.borland.com... > I did not know such was needed at all!! Synchronize() uses window messages internally. > I cannot create that queue Yes, you can. Simply have main() call Application->ProcessMessages() in a loop for the lifetime of the process. > I cannot use VCL at all in the console.. Yes, you can. And you already are - TThread is a VCL class. > Part of my code is inside a dll ... so how can I create "synchronization".. You don't. Not from inside the DLL, anyway. That is the application's responsibility. Have the DLL call the callback in the context of the thread, and then the application has to make sure its callback is actually thread-safe. Gambit
Technical Details
Message-ID:
<45ca50ae$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!homer!news.glorb.com!news-spur1.glorb.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<45ca2bba@newsgroups.borland.com> <45ca3549@newsgroups.borland.com> <45ca373c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7631859e1e5bf75d 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: <45ca2bba@newsgroups.borland.com> <45ca3549@newsgroups.borland.com> <45ca373c$1@newsgroups.borland.com> Subject: Re: Callback, Dll, Thread and synchronization HELP! Date: Wed, 7 Feb 2007 13:13:32 -0800 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 75.83.34.171 Message-ID: <45ca50ae$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1170886830 75.83.34.171 (7 Feb 2007 14:20:30 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!homer!news.glorb.com!news-spur1.glorb.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail