Debugging Tools for Windows |
The EXT_COMMAND macro is used to define an extension command that was declared by using the EXT_COMMAND_METHOD macro.
An extension command is defined as follows
EXT_COMMAND(_Name, _Desc, _Args)
{
...
}
Because EXT_COMMAND is a macro, _Name must be the bare name of the extension command and should not be enclosed in quotation marks or be a variable.
Note The format of the _Args string is not yet documented. EngExtCpp.hpp has comments that describe exactly how to specify the argument syntax for a command. Alternatively, the string "{{custom}}" can be used to indicate that the extension command will parse the arguments itself. The method GetRawArgStr can be used to fetch the raw argument for parsing.
The body of the extension command does not take any arguments. However, because the extension command is declared as a method of the EXT_CLASS class, it has access to all the members of the ExtExtension base class, some of which are initialized for the execution of the extension command.
The macro EXT_COMMAND_METHOD should be used to declare the extension command. As with all C++ declarations, the EXT_COMMAND_METHOD declaration should appear in the source files before the EXT_COMMAND definition.
When the debugger engine calls an extension command method, it wraps the call in a try / except block. This protects the engine from some types of bugs in the extension code; but, since the extension calls are executed in the same thread as the engine, they can still cause it to crash.
This macro also creates a function called _Name (which calls the method defined by the macro). In order for the engine to call the extension, this function must be exported from the extension library DLL.
Headers: Defined in Engextcpp.hpp. Include Engextcpp.hpp.