IDispatch is an OLE Automation interface derived from IUnknown used to expose methods and properties to other applications through COM, and provides a foundation for dispatched interfaces. The most important feature of IDispatch is dynamic method invokation. With a normal, IUnknown-derived COM object, method calling requires the client to know the vtable and calling structure of the server object. With dispatched interfaces, each method and property is assigned a DISPID, and the client simply calls the invoke function with the correct DISPID. Another important function of IDispatch is runtime type information via the ITypeInfo interface. This allows the client to check the object for specific methods, properties, and implemented interfaces.

Log in or register to write something here or to contact authors.