Question

Is there an easy way to create a class that is derived from IDispatch and that can be passed to API like this (this is C++ ):

pDOM2->attachEvent(CComBSTR("event"), new DispatchFunction);

I know how to create a C++ object that handle an invoke with a dispid of value 0 but it's always a bit painful to implement all IDispatch by hand. I was wondering if ATL has some standard way of doing it as it is fairly common.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top