S
SvenC
Hi Nick,
We are comming closer! That is the IDispatch list of IRibbonExtensibility,
not of your custom ICallbackInterface, hence Office is not seeing the
ButtonClicked method. Actually COM does not allow an object to have
different implementations of a single interface and here you see one reason:
which IDispatch should be returned when QI(IID_IDispatch) is executed. COM
defines that QIs on any interface pointer to an object should always return
the same thing.
In ATL you can tweak that with the COM interface map. I get the feeling that
the sequence is important. Try to put COM_INTERFACE_ENTRY2(IDispatch,
ICallbackInterface) as the first entry. Can you post your complete interface
map
Okay, stepping through the names of the functions, it does not appear
to have ButtonClicked cached in m_pMap. There are 8 in total, these are,
GetCustomUI
Invoke
GetIDsOfNames
GetTypeInfo
GetTypeInfoCount
Release
AddRef
QueryInterface
We are comming closer! That is the IDispatch list of IRibbonExtensibility,
not of your custom ICallbackInterface, hence Office is not seeing the
ButtonClicked method. Actually COM does not allow an object to have
different implementations of a single interface and here you see one reason:
which IDispatch should be returned when QI(IID_IDispatch) is executed. COM
defines that QIs on any interface pointer to an object should always return
the same thing.
In ATL you can tweak that with the COM interface map. I get the feeling that
the sequence is important. Try to put COM_INTERFACE_ENTRY2(IDispatch,
ICallbackInterface) as the first entry. Can you post your complete interface
map