Features of Automation Controllers

Writing a simple controller is mostly a matter of calling the IDispatch members correctly. We'll cover this in "Calling IDispatch: A Simple Automation Client" later in this chapter. However, a controller that actually allows an end user to write, run, and debug a script needs to be more sophisticated. Features that sophisticated controllers generally have include the following:

The following two sections discuss the first two of these features; the last two features are primarily centered on type information we discussed in Chapter 3. Now is a good time to review that material. The type library (ITypeLib) and type information (ITypeInfo) objects that OLE can provide for any type library resource provide the browsing capabilities, and the act of compiling a script involves ITypeComp.

The information in these sections is intended to give you ideas—not to be a design primer or anything that precise. These are simply the things you'll want to think about that have direct correlation to the technical parts of OLE Automation.