How the driver works The driver is a dialog-based MFC application. After the project was created with MFC AppWizard, ST-Viewer type library was used to add a class wrapper for the ISTview interface. ClassWizard does this using the AddClass button and then choosing From a type library on the menu. This new IDispatch object is an Automation object in ST-Viewer and it impements the ISTview interface. The next step is to establish return communication from the viewer to the driver via the ISTviewEvents interface.
Communication becomes possible by a mechanism known as connection points .
The CVizdriverDlg class is a connection point container and implements the IConnectionPointContainer interface. The XEvents class has two methods, OnObjectDisplay and OnObjectSelect . These methods are called when ST-Viewer fires the corresponding events. These methods are located at lines 454-501 in vizdriverDlg.cpp . This interface pointer identifies the sink or destination for the events.