Creating an ATL COM object that implements a specific interface

前端 未结 4 1048
面向向阳花
面向向阳花 2021-01-07 02:03

I need to implement a simple ATL COM object that implements a specific interface for which I have been given both a .tlb file and a .idl file. The interface is very simple

4条回答
  •  萌比男神i
    2021-01-07 02:29

    When you compile the .idl file you can ask MIDL to produce a header file with C++ interface definitions - include that header file and inherit your implementation class from the C++ equivalent of the specific interface. You might also need to pass the C++ interface as the parameter to the ATL helper base classes like IDispatchImpl.

提交回复
热议问题