Debugging Tools for Windows

CallExtension

The CallExtension and CallExtensionWide methods call a debugger extension.

HRESULT
  IDebugControl::CallExtension(
    IN ULONG64  Handle,
    IN PCSTR  Function,
    IN OPTIONAL PCSTR  Arguments
    );

HRESULT
  IdebugControl4::CallExtensionWide(
    IN ULONG64  Handle,
    IN PCWSTR  Function,
    IN OPTIONAL PCWSTR  Arguments
    );

#ifdef UNICODE
#define AddExtensionT AddExtensionWide
#else
#define AddExtensionT AddExtension
#endif

Parameters

Handle
Specifies the handle of the extension library that contains the extension to call. If Handle is zero, the engine will walk the extension library chain searching for the extension.
Function
Specifies the name of the extension to call.
Arguments
Specifies the arguments to pass to the extension. Arguments is a string that will be parsed by the extension, just like the extension will parse arguments passed to it when called as an extension command.

Return Value

S_OK
The method was successful.

This method can also return error values. See Return Values for more details.

Interface Version

CallExtension is available in all versions of IDebugControl. CallExtensionWide is available in IDebugControl4 and later versions.

Comments

If Handle is zero, the engine searches each extension library until it finds one that contains the extension; the extension will then be called. If the extension returns DEBUG_EXTENSION_CONTINUE_SEARCH, the search will continue.

For more information on using extension libraries, see Calling Extensions and Extension Functions.

Requirements

Headers: Defined in dbgeng.h. Include dbgeng.h.

See Also

AddExtension, GetExtensionByPath, GetExtensionFunction

Build machine: CAPEBUILD