Connection Point Events Across Processes Boundaries? 
Author Message
 Connection Point Events Across Processes Boundaries?

I am trying to implement a COM object where one process can trigger an event
firing to all connected clients, even if the client resides in another
process.

Can a connection points fire events to clients in another process? If not,
what options are there to notify clients in a different process?

The client in my case is JavaScript. I want two instances of a web browser
to receive the same fired ActiveX event. Possible?



Sun, 28 Dec 2003 02:46:38 GMT  
 Connection Point Events Across Processes Boundaries?
Greets,

    I've done a similar project in the past in which a singleton
out-of-process server (either an executable or service) running under a
specific user context could handle callbacks to multiple clients.
Basically, each client would create an instance of the server object, then
call a method and pass a callback interface.  I avoided the use of
connection points, since COM will happily allow you to pass interfaces to
servers in which the callback can be made.  I kept track of each client's
connection and returned a cookie to the client similar in a fashion that
connection points uses.  The server can then turn around and notify all of
the clients it is holding when it needs to fire back an event.

Regards,

Joe


Quote:
> I am trying to implement a COM object where one process can trigger an
event
> firing to all connected clients, even if the client resides in another
> process.

> Can a connection points fire events to clients in another process? If not,
> what options are there to notify clients in a different process?

> The client in my case is JavaScript. I want two instances of a web browser
> to receive the same fired ActiveX event. Possible?



Sun, 28 Dec 2003 03:09:59 GMT  
 Connection Point Events Across Processes Boundaries?
Certainly, connection points work very nicely cross process, and the
COM wizard generates code that automatically fires the events to
all connected clients.  You just call Fire_whatever() normally.

Your specific case should work fine.

Be aware that the event callbacks are synchronous and sequential.
If one of the clients blocks in its event handler, the server will be
"stuck", and the event will not reach any further clients.  Once the
block is removed, processing will resume (unless some COM
system timeout is exceeded :-)  Obviously, it is inadvisable to
block or do lengthy processing in an event handler.  Other than
that, have fun!


Quote:
> I am trying to implement a COM object where one process can trigger an
event
> firing to all connected clients, even if the client resides in another
> process.

> Can a connection points fire events to clients in another process? If not,
> what options are there to notify clients in a different process?

> The client in my case is JavaScript. I want two instances of a web browser
> to receive the same fired ActiveX event. Possible?



Sun, 28 Dec 2003 03:27:59 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Connection Points - firing an event to a sink in another process

2. IPicture across process boundaries

3. Throwing com exceptions across process boundaries...

4. IXMLDOMNodeList across process boundaries?

5. Can't pass IIDs properly across process boundaries

6. Passing Socket handles across process boundaries??

7. Can't pass IIDs properly across process boundaries

8. Connection points and different process space

9. Connection point Advice over process boundries

10. Problem in firing Events/Connection Points

11. problem receiving events via connection points in atl

12. Connection Points executing, events not firng

 

 
Powered by phpBB® Forum Software