Board index » delphi » D5 - TOLEServer event handling

D5 - TOLEServer event handling

Hi,

Has any one managed to use multiple instances of a TOLEServer to provide
multiple event handlers to a single in-process automation object.
The first TOLEServer autocreates the server and handles the events...
A second instance (connected with ConnectTo) with a ConnectKind of
ckAttachToInterface can access all the methods  from the auto object but
does not receive any events......

Thanks

Phil

 

Re:D5 - TOLEServer event handling


The ability to support multiple sinks (clients) should be implemented by the
server. In particular, if your server is also written in Delphi, make sure
when the ConnectionPoint is created on the server side, you specify ckMulti
instead of ckSingle. In addition, you'll have to learn how to use
IEnumConnections to trigger events to multiple clients.

have fun
--
Binh Ly
Visit my COM Notes at http://www.castle.net/~bly/com

Quote
Phil <p...@cherwell.com> wrote in message

news:7s64lu$bnd9@forums.borland.com...
Quote
> Hi,

> Has any one managed to use multiple instances of a TOLEServer to provide
> multiple event handlers to a single in-process automation object.
> The first TOLEServer autocreates the server and handles the events...
> A second instance (connected with ConnectTo) with a ConnectKind of
> ckAttachToInterface can access all the methods  from the auto object but
> does not receive any events......

> Thanks

> Phil

Re:D5 - TOLEServer event handling


In D5, you dont have to use IEnumConnections, you can use the property
SinkList: TList of TConnectionPoint which holds pointers to IUnknowns from
the clients sinks.

Gunnar Andersson

Quote
Binh Ly wrote in message <7s9cgs$7b...@forums.borland.com>...
>The ability to support multiple sinks (clients) should be implemented by
the
>server. In particular, if your server is also written in Delphi, make sure
>when the ConnectionPoint is created on the server side, you specify ckMulti
>instead of ckSingle. In addition, you'll have to learn how to use
>IEnumConnections to trigger events to multiple clients.

Re:D5 - TOLEServer event handling


Hi Guys,

Thanks for the help - I'll have to wait till the weekend to try again....

Phil

Quote
Gunnar Andersson <gun...@gadata.se> wrote in message

news:7s9ttq$bvm24@forums.borland.com...
Quote
> In D5, you dont have to use IEnumConnections, you can use the property
> SinkList: TList of TConnectionPoint which holds pointers to IUnknowns from
> the clients sinks.

> Gunnar Andersson

> Binh Ly wrote in message <7s9cgs$7b...@forums.borland.com>...
> >The ability to support multiple sinks (clients) should be implemented by
> the
> >server. In particular, if your server is also written in Delphi, make
sure
> >when the ConnectionPoint is created on the server side, you specify
ckMulti
> >instead of ckSingle. In addition, you'll have to learn how to use
> >IEnumConnections to trigger events to multiple clients.

Other Threads