Handling Managed Events from a COM Client

In Chapter 7, you saw how easy it is to handle COM connection point events from a managed client. Therefore, you are probably thinking that it is just as easy to handle events from a managed object in a COM client, right? Well, unfortunately, you will be disappointed. By default, events in a .NET object are not exposed to unmanaged clients at all. You must perform a few extra steps in order to expose your managed events to a COM client. These steps are quite easy, but, even after you perform these steps, you still may encounter some problems. This section shows you how to enable COM clients to handle events fired from your managed components and how to work around some of the problems this may cause. ...

Get .NET and COM Interoperability Handbook, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.