Servers expose functionality through dispatch interfaces or dispinterfaces. Because dispinterfaces are COM interfaces that can be specified in a language-independent fashion, and because all communication between a controller and server is undertaken through dispinterfaces, an Automation controller written in Visual BASIC can access a server written in Dylan without any difficulty.
Dispinterfaces are implemented using the COM interface IDispatch. In Dylan this is represented by the class <simple-dispatch>, page 201.
In an Automation server written using the OLE-Automation library, a dispinterface is represented as a Dylan object supporting methods that can be accessed by the controller.
In an Automation controller written using the OLE-Automation library, a dispinterface is represented by a Dylan object which supports methods for accessing the server.
In OLE Automation, a dispinterface can support two kinds of functionality: properties and methods. Properties are like Dylan class slots: they have a value that can be read or written. Methods are functions that can be called on the dispinterface implementation object, that can accept additional parameters, and that can return a single result value.
Note: We use the term "dispatch method" to try to distinguish the OLE Automation/COM concept of a method from Dylan's concept of a method.
Every dispinterface can support any number of properties and dispatch methods. Controllers can access these properties and dispatch methods using a dispatch ID or DISPID, which is an integer index.
Note: Do not assume that this integer index is represented with a Dylan <integer> because some servers use larger values.
Each property or dispatch method also has a string name. (References to this name are case insensitive.) A controller can query a server to look up the DISPID corresponding to a name. Some standard properties, called stock properties, have a special reserved DISPID, and so do not need to be looked up by name.