Visual Basic 4.0's technology for distributing and executing remote objects offers a glimpse of future Windows technology. Microsoft says these remote-execution features will be included as part of Cairo, the next major upgrade of Windows NT.
When you install the Enterprise Edition on a client machine, Visual Basic adds a new
OLE Automation proxy
. When an OLE client asks to use an object, the Windows Registry knows whether that object resides on a local or remote machine. If it's on a remote machine, the Registry communicates with the new OLE proxy, which converts the standard OLE Automation call to a Windows NT remote procedure call (RPC). The object is then sent across the network wire, where it'
s picked up by the Automation Manager, a multithreaded, redistributable application that the Visual Basic developer places on the server by using the Setup Wizard.
The Automation Manager receives the RPC message stream and reconverts (or
unmarshalls
) the data to standard OLE Automation calls, which are then sent to the server application. Neither the client nor the server deals with anything other than standard OLE Automation. In addition, the programmer doesn't need to know anything about RPC coding.
Because OLE servers created in Visual Basic are single-threaded, programmers tend to run several instances of the same object within a server to achieve multitasking. But since each object takes up roughly 500 KB of RAM, running multiple remote servers simultaneously can drag down performance. To get around this problem, Visual Basic provides a Pool Manager, which maintains pools of objects that can be handed to clients as needed. The pools can be on separate computers.
The Remote Auto
mation technology works only with out-of-process servers. You cannot access a remote in-process DLL directly from a client machine, but the remote server can access those DLLs on its own machine.
illustration_link (16 Kbytes)

Remote Automation works by replacing the original proxy and stub with modules that use the remote procedure call (RPC) protocol to communicate over the network.