Re: fire event & IUnknown
From: brian (brianfakemail_at_yahoo.com)
Date: 01/29/05
- Next message: Jiju George: "Re: subclassing"
- Previous message: Henry: "Re: How to pass COM object created in one EXE into another EXE, an"
- In reply to: Alexander Nickolov: "Re: fire event & IUnknown"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 29 Jan 2005 10:29:48 +0100
> Is your client single-threaded or multi-threaded? Does switching
> the client's threading model change anything?
It is single-threaded - this is an ActiveX control. But my tests with C# and
VB were single-threaded as well (I hope).
All I've read about ActiveX components leads me to think that I should not
change its threading model.
> 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.
Well, the worker thread is created with CreateThread routine. In the
controlling function I call CoInitializeEx(multi-threaded) before any call
to COM is made. However I call Fire_Onxxx directly. I mean I have a pointer
to the object (this pointer) and I call its methods. They are in form of
Onxxx functions. In one of this Onxxx methods I call Fire_Onxxx event.
Surprisingly all the rest events are successful, although they are fired
using the same mechanism, but the Fire_OnFrame event fails.
The server is multi threaded. The _ATL_FREE_THREADED macro is defined in
stdafx.h. The CComMultiThread is used in class declaration.
You are talking about GIT. Could you post any snippet here showing how to
use it? And one more question: wasn't it introduced first at Win2000?
Thanks.
- Next message: Jiju George: "Re: subclassing"
- Previous message: Henry: "Re: How to pass COM object created in one EXE into another EXE, an"
- In reply to: Alexander Nickolov: "Re: fire event & IUnknown"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|