Article View: borland.public.cppbuilder.nativeapi
Article #4774Re: Synchronized call
From: Remy Lebeau (TeamB)
Date: Wed, 30 Nov 2005 23:33
Date: Wed, 30 Nov 2005 23:33
21 lines
1612 bytes
1612 bytes
"Bogdan" <boprea@xnet.ro> wrote in message news:438e1a53@newsgroups.borland.com... > How can I synchronize a function call from a thread using > API functions. I need to do what Synchronize(Function) > from TThread does, but with Win 32 API. Why can't you use Synchronize()? Are you not using TThread? If you must manually do what TThread::Synchronize() already does for you, then use the SendMessage() function. Store a function pointer somewhere in memory and then send a custom message to the main thread. When the message is processed, call the stored function. The thread will be blocked until the message is finished being processed. If you want more specific details, then you should post an example of what you ae trying to accomplish in the first place. Gambit
Technical Details
Message-ID:
<438e3757$3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<438e1a53@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,38c7fb08131702ad 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: <438e1a53@newsgroups.borland.com> Subject: Re: Synchronized call Date: Wed, 30 Nov 2005 15:33:49 -0800 Lines: 23 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: 68.69.17.41 Message-ID: <438e3757$3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1133393751 68.69.17.41 (30 Nov 2005 15:35:51 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail