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.

See also  11 Effective Keyword Research Tools and Techniques
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist