IDebugControl2::AddExtension method (dbgeng.h)

The AddExtension method loads an extension library into the debugger engine.

Syntax

HRESULT AddExtension(
  [in]  PCSTR    Path,
  [in]  ULONG    Flags,
  [out] PULONG64 Handle
);

Parameters

[in] Path

Specifies the fully qualified path and file name of the extension library to load.

[in] Flags

Set to zero.

[out] Handle

Receives the handle of the loaded extension library.

Return value

Return code Description
S_OK
The method was successful.
 

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

Remarks

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.

AddExtension does not complete the process of loading and initializing the extension DLL. To make the extension available for use, make a subsequent call to the GetExtensionFunction.

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

Requirements

Requirement Value
Target Platform Desktop
Header dbgeng.h (include Dbgeng.h)

See also

GetExtensionFunction

GetExtensionByPath

RemoveExtension

IDebugControl

IDebugControl2

IDebugControl3