Re: fire event & IUnknown
From: Alexander Nickolov (agnickolov_at_mvps.org)
Date: 01/28/05
- Next message: Alexander Nickolov: "Re: PreRegister Window class"
- Previous message: Julian Brown: "XP Style + Composite Control"
- In reply to: brian: "Re: fire event & IUnknown"
- Next in thread: brian: "Re: fire event & IUnknown"
- Reply: brian: "Re: fire event & IUnknown"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 28 Jan 2005 09:33:57 -0800
Is your client single-threaded or multi-threaded? Does switching
the client's threading model change anything?
I suspect you have some kind of marshaling problem. How
do you fire from the worker thread? I hope not directly,
since that's most likely your problem right there. GIT would
be most versatile.
-- ===================================== Alexander Nickolov Microsoft MVP [VC], MCSD email: agnickolov@mvps.org MVP VC FAQ: http://www.mvps.org/vcfaq ===================================== "brian" <brianfakemail@yahoo.com> wrote in message news:1106917366.549668.153410@z14g2000cwz.googlegroups.com... >> Try providing an explicit _ATL_FUNC_INFO structure with >> SINK_ENTRY_INFO instead of SINK_ENTRY_EX. > Does not work. > > But I've gotten further. Really the problem is the multi-threaded > apartment. I have created a test solution. It contains one server and > one client ATL projects. The client project consists of one ATL ActiveX > object - the sink. The server project consists of two objects. The > first object is a single-threaded ATL simple object. The second one is > a multi-threaded ATL simple object. They both have their own trigger > method with exactly the same implementation. > > The client creates and advises them. > > In the test container: > - the triggered event from STA object is successfully handled within > the client; > - triggering the event from MTA object failed with E_UNEXPECTED. > > So, the threading model is causing the event to fail. However I am > really curious why the rest events have been successfully fired from my > original multi-threaded object (refer my previous posts) and only this > one (with IPictureDisp interface pointer) has failed. > > My question now is how to work around this limitation, since: > - I do need worker threads, thus I have to use multi-threaded > apartment; > - I do need to fire events from within worker threads; > - finally I do need to use IPictureDisp or similar interface. > Any further tips are appreciated. > Thanks. >
- Next message: Alexander Nickolov: "Re: PreRegister Window class"
- Previous message: Julian Brown: "XP Style + Composite Control"
- In reply to: brian: "Re: fire event & IUnknown"
- Next in thread: brian: "Re: fire event & IUnknown"
- Reply: brian: "Re: fire event & IUnknown"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|