I have a legacy Win32 application (WndProcs, etc) that needs to consume a COM object. With the use of a little ATL headers and some smart pointers that was a snap, however what I'm currently struggling with is how best to sink the events coming off that COM object?
My current working plan has been to build a second COM object (as a dll) that handles all the sinking and uses windows messages to communicate with the legacy application. This is "ok" but there's a lot of cruft moving messages back and forth to make the legacy application do what I want.
Is there a readily accessible way to get the Win32 legacy application to sink COM events directly vs running through the second "sinker" com object?
Before I go to far down this process I wanted to see if anyone else ran across this before and had a working solution.
Thanks!
Advise(). That's how connection points work. If you're asking whether you have to implement the COM object on which that event target interface hangs as a DLL-based inproc server, the answer is no, but you need an interface regardless. How you provide that interface is entirely up to you.IDispEventImplaccepts "typical" ActiveX control events delivered via connection points andIDispatch::Invoke.