IDispatch Interface and Accessibility
The IDispatch interface was initially designed to support Automation. It provides a late-binding mechanism to access and retrieve information about an object's methods and properties. Previously, server developers had to implement both the IDispatch and IAccessible interfaces for their accessible objects; that is, they had to provide a dual interface. With Microsoft Active Accessibility 2.0, servers can return E_NOTIMPL from IDispatch methods and Microsoft Active Accessibility will implement the IAccessible interface for them.
In addition to the methods inherited from IUnknown, server developers must implement the following methods within the class definition of each object that is exposed:
- GetTypeInfoCount returns the number of type descriptions for the object. For objects that support IDispatch, the type information count is always one.
- GetTypeInfo retrieves a description of the object's programmable interface.
- GetIDsOfNames maps the name of a method or property to a DISPID, which is later used to invoke the method or property.
- Invoke calls one of the object's methods, or gets or sets one of its properties.