Deriving the Startup Event Classes
All events passed to the session debug manager are derived from IDebugEvent2. TextInterpreter uses CEventBase as the base class; it also uses it to implement the IDebugEvent2 interface, so all other events that TextInterpreter implements inherit from both CEventBase and a specific event interface. However, in Visual Studio the Add Class Wizard supports only a single inheritance, so the specific event interface is given to the Add Class Wizard, and later the CEventBase inheritance is added manually. This also requires modifying the constructor for each event class so that it calls the base class with the appropriate parameters.
In addition, all event objects used by TextInterpreter are kept in a single pair of files, EventBase.h and EventBase.cpp.
The first two events typically sent by a debug engine are represented by the IDebugEngineCreateEvent2 and IDebugProgramCreateEvent2 interfaces.