␡
- Tricks for Modifying Interop Assemblies
- Making Event Sink Helpers Public
- Adding Custom Marshalers
- Marking Classes As Visual Basic Modules
Making Event Sink Helpers Public
The type library importer generates event sinks as private classes with names like XXX_SinkHelper because there's no need for managed code to directly interact with them. However, this transformation doesn't work for COM event sources that require sinks to implement IDispatch because private .NET classes do not expose an implementation of this interface to COM. The easiest way to satisfy such COM components is to change private classes like the following:
.class private auto ansi sealed XXX_SinkHelper
to public classes:
.class public auto ansi sealed XXX_SinkHelper