Debugging Tools for Windows |
Callback functions of the type PDEBUG_EXTENSION_CALL are called by the engine to execute extension commands. You can give these functions any name you want, as long as it contains no uppercase letters.
HRESULT
CALLBACK
(* PDEBUG_EXTENSION_CALL)(
IN IDebugClient * Client
IN OPTIONAL PCSTR Args
);
All other return values are ignored by the engine.
The name of the function becomes the name of the extension command. When executing an extension command, the engine searches through each of the loaded extension DLLs in turn, looking for an exported function that has the same name as the command. For example, when executing the command !stack, the engine will look for an exported function named stack in each loaded extension DLL. For information about the order in which extension DLLs are searched, see Using Debugger Extension Commands.
The extension function should use the client that was passed to it in Client for all interaction with the engine, unless it has a specific reason to use another client. The extension function should not maintain the pointer to the client object after it has finished.
Headers: The function type is defined in dbgeng.h.