Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

5.2. Transparency

When a client invokes a method on a remote object’s interface, it doesn’t know, and doesn’t have to know, where the target object exists. Yet the method invocation will find its way to the target object. This is the idea of location transparency, and it is one of the beauties of COM. As you have seen, the marshaling provided automatically by RPC is usually sufficient to pass arguments from a client to a server component. COM needs a little help, however, in one situation: where you try to pass an interface pointer as an argument so that the same object can be used by both a client and a server.

When you pass data between two different execution contexts (e.g., two processes) in COM, it is said to go from one apartment to another. In this section, assume that a client and a server occupy separate apartments and you have to get the interface pointer between them.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint