How Different Tools Implement Events

The next two sections are experiments that I believe are most useful in understanding how COM events work. These experiments show how different compilers generate their own event interfaces.

Events and Visual Basic

If you create a VB ActiveX control and compile the project into an OCX, you can use OLEView to read the OCX's type library. Start OLEView and select File, View TypeLib from the menu bar. Select your newly created OCX and click the Open button. The right pane of the ITypeLib viewer displays the content of the type library in IDL format. Listing 6.21 is the default IDL generated for a Visual Basic ActiveX control.

Code Listing 6.21. IDL of Visual Basic ActiveX Control
 // Generated .IDL file (by ...

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.