COM event source example/framework?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

COM event source example/framework?

Bill Schwab-2
Hi Blair,

Scott's recent questions reminded me of a non-related suggestion that I
don't think ever made it to the newsgroup (appologies if I mentioned this
before).  I suspect that part of why people build custom event systems over
using connectable objects is that the latter is a little tricky, or at least
seems that way.  You've made sinking events as brain-dead simple (and
elegant!) as it could be, but I don't see a counterpart for making an event
source.  Am I missing it?  Is there room for a sample or reusable
implementation?

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: COM event source example/framework?

Blair McGlashan
"Bill Schwab" <[hidden email]> wrote in message
news:ak09n0$172d42$[hidden email]...
> Hi Blair,
>
> Scott's recent questions reminded me of a non-related suggestion that I
> don't think ever made it to the newsgroup (appologies if I mentioned this
> before).  I suspect that part of why people build custom event systems
over
> using connectable objects is that the latter is a little tricky, or at
least
> seems that way.  You've made sinking events as brain-dead simple (and
> elegant!) as it could be, but I don't see a counterpart for making an
event
> source.  Am I missing it?  Is there room for a sample or reusable
> implementation?

You're right, there isn't a generic event source implementation and it would
be useful. I agree it seems tricky, but this is (I think) because the system
is somewhat over designed and has too many objects or too many levels of
indirection (I don't remember quite which). It basically involves
implementing IConnectionPointContainer and IConnectionPoint container.
Firing the events is just a matter of calling out (from the Dolphin server)
through the client-supplied event interfaces, which is exactly the same as
calling any other COM interface (usually just IDispatch for events), and so
that is already fully supported. Implementing the connection point
interfaces involves some fairly simple collection management, so ought to be
pretty easy. I'll add an enhancement request.

Regards

Blair