How to hook up a COM event dispatcher?
问题 The VBIDE API exposes the wonderfully cryptic _dispVBComponentsEvents interface (among others), which look like something that I could use to capture various interesting events in the VBE. So I implemented the interface in a class that intends to capture the event and raise a "normal" .net event for the rest of my application to handle, like this: public class VBComponentsEventDispatcher : _dispVBComponentsEvents { public event EventHandler<DispatcherEventArgs<VBComponent>> ComponentAdded;