J
Jayme Pechan
I created a C# service and registered its types for .NET remoting. Now I
need to create an instance of the object from a client application.
Previously I had implemented the service in ATL so I just added the
reference and it created an Interop with all the function signatures and
such. As far as I can tell the .NET remoting mechanism isn't that easy.
The following code is the best I could figure out. My problem is that the
Class1 class is defined in the service. How do I get the definitions in the
client?
Class1 myObj =
(Class1)Activator.GetObject(typeof(Class1),"tcp://localhost:16000/Class1");
myObj.Test("Hello World");
I saw an example in the docs but they used a DLL. I can't really do that
because I need the class to be able to access other classes in my service at
runtime. Any ideas?
Thanks.
need to create an instance of the object from a client application.
Previously I had implemented the service in ATL so I just added the
reference and it created an Interop with all the function signatures and
such. As far as I can tell the .NET remoting mechanism isn't that easy.
The following code is the best I could figure out. My problem is that the
Class1 class is defined in the service. How do I get the definitions in the
client?
Class1 myObj =
(Class1)Activator.GetObject(typeof(Class1),"tcp://localhost:16000/Class1");
myObj.Test("Hello World");
I saw an example in the docs but they used a DLL. I can't really do that
because I need the class to be able to access other classes in my service at
runtime. Any ideas?
Thanks.