[Sorry for cross-posting, but this topic equally relates to remoting and
interop!]
I am extending a legacy app which uses DCOM to implement a networked
client-server architecture. As some more recent parts of the app are written
in .NET, I would like to use it for my new extensions. I have been
successful in building a .NET remoting sample, so I have an inkling how it
works.
Anyway, what I want to do is to is to pass a reference to a remoteable .NET
object from one AppDomain to another via a COM client-server infrastructure
which is already in place. In other words, I want to create a remoteable
.NET object on the server and return a (CCW) interface pointer to a COM
object on the server. This CCW interface is returned to a COM client on the
client machine via DCOM. Now I want to pass the CCW COM interface to a .NET
object on the CLIENT machine and get back a .NET reference to the .NET
server object running on the server machine.
Can this be done? If so, how? A tiny sample or code snippets would be
extremely helpful and very much appreciated.
Jim Sievert - 23 Jun 2004 14:17 GMT
If I understand your question correctly, your work is done. A CCW is
already an MBRO. You can pass it directly into .Net code on the client. As
long as you have an assembly on the client that represents the interfaces
implemented by the target object on the server, all you need on the client
is a simple cast!
> [Sorry for cross-posting, but this topic equally relates to remoting and
> interop!]
[quoted text clipped - 16 lines]
> Can this be done? If so, how? A tiny sample or code snippets would be
> extremely helpful and very much appreciated.
Larry Heller - 23 Jun 2004 17:08 GMT
Sorry for my ignorance... what is an MBRO?
> If I understand your question correctly, your work is done. A CCW is
> already an MBRO. You can pass it directly into .Net code on the client. As
[quoted text clipped - 27 lines]
> > Can this be done? If so, how? A tiny sample or code snippets would be
> > extremely helpful and very much appreciated.
Sunny - 23 Jun 2004 17:20 GMT
MBRO = MarshalByReferenceObject
All objects passed thru remoting have to be MBRO or marked as
ISerializable.
MBRO as the name shows are passed as a reference, while ISerializable
objects are passed by value.
Sunny
> Sorry for my ignorance... what is an MBRO?
>
[quoted text clipped - 31 lines]
> > > Can this be done? If so, how? A tiny sample or code snippets would be
> > > extremely helpful and very much appreciated.