O'Reilly logo

Extending MFC Applications with the .NET Framework by Nishant Sivakumar, Tom Archer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Returning Objects to the Server

So far, we've seen situations where we get a remote reference to an object on the remote server and make calls on it. Now there might be times when you want to pass a local object to the remote server, so that the remote object can access the local object. We'll see such an example now, where we pass an object by reference to the server and the server objects manipulate this object.

The Remoted Objects

As usual we define our remotable objects in a library that both client and server can share. This time we have two objects: the object that is remoted by the server and the object that is passed from the client to the server. Let's look at the object that is passed by reference to the server:

 public __gc class MyClass ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required