ATL Question:

How to Implement multiple dual interfaces?

Tweet Share WhatsApp

Answer:

We can implement a dual interface using the IDispatchImpl
class, which provides a default implementation of the
IDispatch methods in a dual interface. For more information
To use this class:

Define your dual interface in a type library.

Derive your class from a specialization of IDispatchImpl
(pass information about the interface and type library as
the template arguments).

Add an entry (or entries) to the COM map to expose the dual
interface through QueryInterface.

Implement the vtable part of the interface in your class.

Ensure that the type library containing the interface
definition is available to your objects at run time.

Download ATL PDF Read All 27 ATL Questions
Previous QuestionNext Question
Which ATL Classes Facilitate ActiveX Control Containment?What are the known problems with the ATL 2.0 Object Wizard?