Calling COM Methods Between Machines

Now that we have a basic understanding of how an interface method call is transmitted across two communicating processes on the same machine or across a network, the next logical question is: how is the object on the destination created in the first place? Simply put, the SCM will locate or create the object instance across the network whenever necessary (if there are no object instances which can service the call, the SCM will launch the required object server on the remote machine, subjected to security constraints detailed in the next chapter). In the case where the caller and called party are both on the same machine under the same OS, the channel is typically working over shared memory and LRPC will be used. In the case where the caller and called party are on different machines over a network, the channel uses the DCE RPC over a layer of network software called the protocol stack (usually TCP/IP but IPX and NETBEUI are also supported by RPC on Windows platforms).

Of course, there's low level sanity checking and connection management work that DCOM must do because of the added network connection. All this work, though, is completely hidden from you as an application developer and you can develop components without worrying about where they may be executed.

© 1997 by Wrox Press. All rights reserved.