
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