all groups > dotnet remoting > september 2004 >
You're in the

dotnet remoting

group:

Two way communications using .NET Remoting


Two way communications using .NET Remoting John Olbert
9/28/2004 12:25:06 PM
dotnet remoting:
newgroup: dotnet.framework.remoting

Subject: Two way communications using .NET Remoting

We want to use Remoting to establish two communications (both by value and
reference) between two C# modules. One is a standalone Exe using Window
Form's. The other is a C# Dll that is loaded by a modified unmanaged C++ Exe,
modified to contain managed C++ code that uses the C# Dll.

Everything works at this point except we don't know how to set up a two way
calling system between the C# Dll and the C# Exe. We have established a one
way Remoting system. The C# Dll can successfully call functions on the C# Exe
and also transfer (by value) full classes over to the C# Dll.

We tried to use the same server side code on the client to make it a server
but it did not work.

Any suggestions?

Thanks much.
--
John Olbert
Re: Two way communications using .NET Remoting Ken Kolda
9/29/2004 8:58:27 AM
They way I'd do this is, upon establishing a connection to the server, I'd
have the client pass the server a MarshalByRef object to be used for
callbacks (actually, I'd make it so the server only needed the object's
interface). When the server needed to contact the client, it would simply
invoke a method on the callback object.

Ken


[quoted text, click to view]

Re: Two way communications using .NET Remoting John Olbert
10/4/2004 12:45:06 PM
Thanks.

This did work.

If it is acceptable could I send a small demo Solution for your review, to
be sure I covered the main points.

Thanks again.

--John Olbert


[quoted text, click to view]
AddThis Social Bookmark Button