Board index » delphi » DCOM Events?

DCOM Events?

    Hi

I want to create some automation server wich will run on server and seeral
clients will use it for some services. And i also want server to call
someclient functions just like events in Delphi. Can i just make client to
support some interface, pass this interface to server and then just call
functions from this interface from server?

  Regards

Alex V. Ognev

 

Re:DCOM Events?


Yes, you can do that -- and it'd be a lot easier (from the message
traffic I've seen) than getting "events" to work on the client!  Less
overhead too, I think.

Just make sure, as always with interfaces, never to change the
definition of the interface(s).  If you want a better one, make a new
interface with a new name (the MS tradition is to stick a 2 or Ex on the
end).

Re:DCOM Events?


Alex,

That's a definite maybe.

In a simple client/server situation you can pass any interface pointer you
want and call routines from client or server. If you have several clients
connected to the server, and the server needs to make notifications to each
client then you probably need to keep a list of clients in the server. You
also have to deal with situations such as a client being blown off without
the server being notified.

The IConnectionPoint interface was designed to deal with most of this kind
of stuff. You can implement anything that gets the job done but connection
points are already about as minimal as it gets. The description in Kraig
Brockscmid's book is one of the clearer chapters in the book.

The complexity doesn't come from the interface, it comes from MicroSoft's
half-a**ed and undocumented implementation of their own interface
specifications. You might also take note that connection points are usually
implemented as a dispatch interface. This isn't a requirement, unless you
need compatibility with visual basic clients or you are working with a MS
server.

HTH,

Gerry Pierce

======================================
If at first you don't succeed, skydiving is not for you.
======================================

Quote
Alex V. Ognev wrote in message <66jj06$...@forums.borland.com>...
>    Hi

>I want to create some automation server wich will run on server and seeral
>clients will use it for some services. And i also want server to call
>someclient functions just like events in Delphi. Can i just make client to
>support some interface, pass this interface to server and then just call
>functions from this interface from server?

>  Regards

>Alex V. Ognev

Other Threads