Implementing Dual Interfaces

Although Automation allows you to implement an IDispatch interface, a VTBL interface, or a dual interface (which encompasses both), it is strongly recommended that you implement dual interfaces for all exposed ActiveX objects. Dual interfaces have significant advantages over IDispatch-only or VTBL-only interfaces.

  • Binding can take place at compile time through the VTBL interface, or at run time through IDispatch.

  • ActiveX clients that can use the VTBL interface may benefit from improved performance.

  • Existing ActiveX clients that use the IDispatch interface will continue to work.

  • The VTBL interface is easier to call from C++.

  • Dual interfaces are required for compatibility with Visual Basic object support features.