How to create anonymous IDispatch functions with ATL?
문제
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.
올바른 솔루션이 없습니다
제휴하지 않습니다 StackOverflow