ATL COM object pointer and fire events 
Author Message
 ATL COM object pointer and fire events

I have a COM Exe Server(MFC app with inserted ATL com Objects) that is
saving the created com object pointers in a global list from the created com
objects constructor. When my server wants to fire events it goes through the
pointer list and calls myobject->fire_ on each of the pointers. What am I
saving? Is this what you would call a raw interface? It is the this pointer
from the client created com object....what would you call this in COM? Is
this what I should save if I want to fire events on all my created com
objects? Should I save the sink interface instead?

Thanks,
mike



Sat, 20 Nov 2004 03:25:08 GMT  
 ATL COM object pointer and fire events
If I understand you correctly, you are saving raw C++ pointers. They
have nothing to do with COM - you could just as well cache pointers to
non-COM classes and call methods on those.

I don't see anything particularly wrong with your solution, assuming the
server is single-threaded and always calls Fire_XXX methods on the
primary thread.
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> I have a COM Exe Server(MFC app with inserted ATL com Objects) that is
> saving the created com object pointers in a global list from the
created com
> objects constructor. When my server wants to fire events it goes
through the
> pointer list and calls myobject->fire_ on each of the pointers. What
am I
> saving? Is this what you would call a raw interface? It is the this
pointer
> from the client created com object....what would you call this in COM?
Is
> this what I should save if I want to fire events on all my created com
> objects? Should I save the sink interface instead?

> Thanks,
> mike



Sat, 20 Nov 2004 05:28:25 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ATL COM Component firing events into VBScript event sink

2. passing COM object pointers to another COM object in ATL

3. cegadgets.com ATL CE event firing

4. Fire event with ByRef param from ATL COM ?!

5. creating a sink in VC to handle events fired by VB Com Object

6. Exception fired during DLL unload in ATL com object

7. COM/ATL novice:passing object pointers through methods on a COM interface

8. Using events with ATL com-objects in eVB

9. Return a pointer to a nested COM object from a COM object method

10. ATL COM - Passing ATL COM classes through another ATL COM class in the same app

11. Lots of trouble getting my ActiveX events to fire under ATL

12. Firing ATL events between 2 STA's

 

 
Powered by phpBB® Forum Software