Dispatch Interface Types

Dispatch interface types define the methods and properties that an Automation object implements through IDispatch. Calls to methods of a dispatch interface are routed through IDispatch's Invoke method at runtime; a class cannot implement a dispatch interface.

A dispatch interface type declaration has the form type interfaceName = dispinterface ['{GUID}'] memberList end;

where ['{GUID}'] is optional and memberList consists of property and method declarations. Dispatch interface declarations are similar to regular interface declarations, but they cannot specify an ancestor. For example, type

IStringsDisp = dispinterface ['{EE05DFE2-5549-11D0-9EA9-0020AF3D82DA}']

property ControlDefault[Index: Integer]: OleVariant dispid 0;


function Count: Integer; dispid 1;

property Item[Index: Integer]: OleVariant dispid 2; procedure Remove(Index: Integer); dispid 3; procedure Clear; dispid 4;

function Add(Item: OleVariant): Integer; dispid 5; function NewEnum: IUnknown; dispid -4;


Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook

Post a comment