devxlogo

Use IDispatchImpl for Default Implementation for IDispatch of Dual Interfaces

Use IDispatchImpl for Default Implementation for IDispatch of Dual Interfaces

The communication between the COM client and server can happen in three ways: the vtble interface, dispinterface, or dual interface. The COM client can communicate with the server through IDispatch interface by calling the member functions in IDispatch interface to indirectly invoke the functions in the automation server. DispInterface (or dispatch interface) is implemented by IDispatch and are distinct from COM interfaces (vtable interfaces). Actually, the set of functions implemented by IDispatch :: invoke is called a dispinterface. A dual interface is a dispinterface that makes all the functions that are available through invoke also available through vtbl.

IDispatchImpl provides a default implementation for the IDispatch portion of any dual interface on your object. A dual interface derives from IDispatch (instead of IUnknown ) and uses only Automation-compatible types. Like a dispinterface, a dual interface supports early and late binding; however, a dual interface differs in that it also supports vtble binding.

devx-admin

Share the Post: