I am attempting to add some functionality to a COM object by including another Interface called INvRtrProtocolEx3Itf. However I am running into errors when compiling. I have researched the error code and the page gave some examples of the error and how to fix it but none showed an example using the COM_INTERFACE_ENTRY method.
I found similar questions on here, QUESTION 1 and QUESTION 2 but they both refer to BEGIN_MESSAGE_MAP errors and not the BEGIN_COM_MAP errors...
I am new to COM but I am working on a Project that uses it extensively. I am using another COM object for reference that uses the interface I am trying to add but now I am stuck on where to go about fixing this error. How do I go about getting the COM object to compile or where could I look to fix the issue?
Here is the Code
BEGIN_COM_MAP(CNvRtrProtocolXxxImpl)
COM_INTERFACE_ENTRY(INvRtrProtocolXxxItf)
COM_INTERFACE_ENTRY(INvRtrProtocol4Itf)
COM_INTERFACE_ENTRY(INvComponent3Itf)
//added the following line to add another interface
COM_INTERFACE_ENTRY(INvRtrProtocolEx3Itf) //throws error 1 (C2440)
COM_INTERFACE_ENTRY(ISupportErrorInfo)
END_COM_MAP() //throws error 2 (C2440)
Error 1
error C2440: 'static_cast': cannot convert from 'CNvRtrProtocolXxxImpl::_ComMapClass *' to 'INvRtrProtocolEx3Itf *'
Error 2
error C2440: 'initializing': cannot convert from 'ATL::_ATL_CREATORARGFUNC (__cdecl *)' to 'DWORD_PTR'