Debugging Tools for Windows

AddExtension

The AddExtension and AddExtensionWide methods load an extension library into the debugger engine.

HRESULT
  IDebugControl::AddExtension(
    IN PCSTR  Path,
    IN ULONG  Flags,
    OUT PULONG64  Handle
    );

HRESULT
  IDebugControl4::AddExtensionWide(
    IN PCWSTR  Path,
    IN ULONG  Flags,
    OUT PULONG64  Handle
    );

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

Parameters

Path
Specifies the fully qualified path and file name of the extension library to load.
Flags
Set to zero.
Handle
Receives the handle of the loaded extension library.

Return Value

S_OK
The method was successful.

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

Interface Version

AddExtension is available in all versions of IDebugControl. AddExtensionWide is available in IDebugControl4 and later versions.

Comments

If the extension library has already been loaded, the handle to already loaded library is returned. The extension library is not loaded again.

The extension library is loaded into the host engine and Path contains a path and file name for this instance of the debugger engine.

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

Requirements

Headers: Defined in Dbgeng.h. Include Dbgeng.h.

See Also

RemoveExtension, GetExtensionByPath

Build machine: CAPEBUILD