I am trying to handle COM events from a C# server to a C++ client. I am able to use the server regfree but my events no longer work.
Previously, with registration, the events were handled in the client via IDispEventImpl
from the ATL.
I haven't been able to find any articles directly addressing this but I did see a suggestion that IConnectionPoint
does not inherently require registration.
I also saw some suggestion that IDispEventSimpleImpl
may work regfree.
IDispEventImpl
requires access to a type library. You'll need to include a reference in your server manifest, so that it can be loaded into the activation context:Your client sink needs to be declared with the typelib ID as well:
As an alternative, you can also implement
IDispEventSimpleImpl
, which works without a type library.