What is a dual interface?
Tushar Agrawal
Although OLE Automation allows you to implement an IDispatch interface, a VTBL interface, or a dual interface (which encompasses both), Microsoft strongly recommends that you implement dual interfaces for all exposed OLE Automation 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.
· OLE Automation controllers that can use the VTBL interface may benefit from improved performance.
· Existing OLE Automation controllers 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.
Dual interface is one that supports both - IDispatch interface and vtbl-based interface. Therefore, it might be used in scripting environment like VBScript and yet to use power and speed of vtbl-based interface for non-scripting environment. Discussion then may easily transform into analyzing of dual interface problems - be prepared to this twist.