RAD Studio
ContentsIndex
PreviousUpNext
Automation Servers

Automation refers to the ability of an application to control the objects in another application programmatically, like a macro that can manipulate more than one application at the same time. The server object being manipulated is called the Automation object, and the client of the Automation object is referred to as an Automation controller. 

Automation can be used on in-process, local, and remote servers. 

Automation is characterized by two key points:

  • The Automation object defines a set of properties and commands, and describes their capabilities through type descriptions. In order to do this, it must have a way to provide information about its interfaces, the interface methods, and those methods' arguments. Typically, this information is available in a type library. The Automation server can also generate type information dynamically when queried via its IDispatch interface (see following).
  • Automation objects make their methods accessible so that other applications can use them. For this, they implement the IDispatch interface. Through this interface an object can expose all of its methods and properties. Through the primary method of this interface, the object's methods can be invoked, once having been identified through type information.
Developers often use Automation to create and use non-visual OLE objects that run in any process space because the Automation IDispatch interface automates the marshaling process. Automation does, however, restrict the types that you can use. 

For a list of types that are valid for type libraries in general, and Automation interfaces in particular, see Valid types.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!