EngExtCpp Extension Libraries
An EngExtCpp extension library is a DLL that uses the EngExtCpp extension framework found in EngExtCpp.h. When this library is loaded by the debugger engine, its methods and functions can provide extra functionality or automation of tasks while performing user-mode or kernel-mode debugging on Microsoft Windows.
The EngExtCpp extension framework is built on top of the DbgEng extension framework. It offers the same debugger engine API for interaction with the debugger engine. but it also provides additional features to make common tasks simpler.
If you performed a full install of Debugging Tools for Windows, a sample EngExtCpp extension called "extcpp" can be found in the sdk\samples\extcpp subdirectory of the installation directory.
EXT_CLASS and ExtExtension
At the core of an EngExtCpp extension library is a single instance of the EXT_CLASS class. An EngExtCpp extension library will provide the implementation of this class, which contains all the extension commands and methods for formatting structures that are exported by the library.
When the extension library is loaded, the Initialize method of the class is called by the engine, and the Uninitialize method is called before unloading the class. Additionally, the methods OnSessionActive, OnSessionInactive, OnSessionAccessible, and OnSessionInaccessible are called by the engine to notify the extension library of the state of the debugging session.
The EXT_CLASS class can contain a number of methods that are used to execute extension commands. Each extension command is declared in the EXT_CLASS class by using the EXT_COMMAND_METHOD macro. The implementation of a command is defined by using the EXT_COMMAND macro.
The EXT_CLASS class can contain a number of methods that use the ExtProvideValueMethod prototype. The methods can be used by the engine to evaluate some pseudo-registers provided by the extension.