Maybe I should precise my question...
Within XLL Add-Ins, it is possible to pass the function pointer of a VBA UDF
to the add-in using "AddressOf". The goal being to define a callback function
from the Add-In to VBA/Excel.
But this is not safe at all (there is no way to check the function pointer
is still valid).
And moreover, it bypass any COM "behaviour" (for example problems with STAs,
bypassing of IMessageFilter...)
In case of Com Add-Ins, an add-in should use Com interfaces provided by
Excel/Mso/Vbe6Ext/MSADDNDR.
So, because I would like to provide users of my Add-In with the possibility
to define and "register" their own callback function in VBA:
1) Is it possible to define a module in VBA as a Com Object, straight away?
(I don't think so, but as it is possible to implement a Com Interface like
IDTExtensibility2 in VBA... maybe there some interface... for example the
possibility to "add" a connection point on the Excel "side" that can be
implemented in VBA and to sink to it from my Add-In...)...
2) Or, is there an "Excel/Mso/Vbe6Ext" Com interface that allows to call a
VBA UDF (by name) from a Com Add-In? (I did not find any)
3) Or, maybe there is some other solution to allow a user of my Com Add-In
to write his own call back function in VBA without using the AddressOf
function...
Hope this is clearer