Go to the first, previous, next, last section, table of contents.


Dispatch interfaces and type libraries

A dispatch interface, in COM lingo, is an interface that supports dynamic, interpreted dispatch of method interfaces. This form of interpreted dispatch is used by Visual Basic and other scripting languages to perform calls to methods of COM components.

CamlIDL provides minimal support for dispatch interfaces. To equip a Caml component with a dispatch interface (thus making it callable from Visual Basic), you need to do the following:

  1. Use "IDispatch" instead of "IUnknown" as the super-interface of the component's interfaces.
  2. Write a type library for your component and compile it using "midl". A type library is a run-time representation of the interfaces supported by an object. The "midl" compiler can generate a type library from the IDL description of the component, enriched with some special-purpose declarations (the "library" and "coclass" statements). Refer to the documentation of "midl" for more information.
  3. Pass the type library files (".tlb" files) generated by "midl" as extra arguments to "camlidldll" when generating the DLL for your Caml component.


Go to the first, previous, next, last section, table of contents.