Board index » delphi » how to implement the sink interface for remote automation sever to callback

how to implement the sink interface for remote automation sever to callback

When I use DELPHI 3.0 c/s to implement Automation sever
with remote-sever tpye, nothing wrong happens until I want to provide
IConnectionPointContainer interface to Client program. Client Program
can use IConnectionPoint.Advise to supply the interface to automation
server for callback.

   This procedure is correct when Automation server is local-server.
When Automation sever is Remote-sever, All member functions of callback
interface seem not to be called, for example, QueryInterface. I do
not know how to solve this problem.

 

Re:how to implement the sink interface for remote automation sever to callback


Quote
Joe Tsai wrote:

> When I use DELPHI 3.0 c/s to implement Automation sever
> with remote-sever tpye, nothing wrong happens until I want to provide
> IConnectionPointContainer interface to Client program. Client Program
> can use IConnectionPoint.Advise to supply the interface to automation
> server for callback.

>    This procedure is correct when Automation server is local-server.
> When Automation sever is Remote-sever, All member functions of callback
> interface seem not to be called, for example, QueryInterface. I do
> not know how to solve this problem.

I've been doing a lot of work on this recently. The trouble is that that
your callback interface needs to be marshalled when the server is
remote. Windows needs to know it's exact format to be able to handle it.

My project is using Delphi2 and I have to manually create an ODL file
for all the interfaces. If, however, you're using D3, you should be able
to use the Type Library Editor to create a definition of the callback
interface (including it's IID and methods) so it can be recognised. You
might also need to fiddle with the flags... I think, but I'm not sure,
that for automatic marshalling to be supported, the interface must be
flagged as OleAutomation and only use Ole Automation compatible types
[or implemented as a dispatch or dual interface].

--
Paul Gilbert, Year 5 Bach App Sci, Bach Eng at RMIT Melbourne, Australia
----------------
The opinions expressed are my own, all my own, and as such will contain
no references to small {*word*141} creatures from Alpha Centauri.

Re:how to implement the sink interface for remote automation sever to callback


Hello,

It appears that security is just not properly configured on the client side
for the server to be able to invoke the callback properly. Check the access
and launch permissions under DCOMCNFG on the CLIENT machine and make sure
you are allowing the server to callback to it.

have fun,

--
Binh Ly
Brickhouse Data Systems, Inc.
http://www.brickhouse.com

Quote
Joe Tsai wrote in message <359C6735.1...@dbtools.com>...
>When I use DELPHI 3.0 c/s to implement Automation sever
>with remote-sever tpye, nothing wrong happens until I want to provide
>IConnectionPointContainer interface to Client program. Client Program
>can use IConnectionPoint.Advise to supply the interface to automation
>server for callback.

>   This procedure is correct when Automation server is local-server.
>When Automation sever is Remote-sever, All member functions of callback
>interface seem not to be called, for example, QueryInterface. I do
>not know how to solve this problem.

Other Threads