Events and Visual Basic
I fired the event in the previous example using the vtable. Visual Basic generates automation code only for its event sinks and does not generate any vtable code to capture event notifications. That means I must call the IDispatch::Invoke method in order to fire the event in a Visual Basic client.
Black Hole of Events
This is one of the big black holes in Microsoft's object-oriented architecture. How is the programmer supposed to know which interface to fire the event with, the dispatch or the vtable interface? It is simply not possible without imposing limits on the model.
You could impose a rule on COM servers that they must call both the vtable and dispatch interface, but this would result in additional client code ...
Get COM+ Unleashed 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.