
Event source and sink for COM without ATL or MFC
Quote:
> Hi,
> I'm writing a COM object without the use of ATL or MFC.
> Only problem are events.
> How do I write the event source code in c++ (maybe some windows API's)?
> Once the source is implemented, the sink should not be too difficult..
> Anyone knows where I can find more information about this subject?
"Inside COM" by Rogerson is a great book. Now, that aside, from personal
experience - don't even use any "connection points", it's an unnecessary
mechanism. Simply create an object where your events are needed, and give an
instance of that object to the code where the events happen, so it can, sorta,
"yank the chain" into the user code. That's all, functionally it's just the same
as connection points and you don't need to{*filter*}with the "standard" mechanism.
It's limiting and you need to learn how to use it, whereas neither one is
necessary in practice. Straight COM objects will do the job.