PDEBUG_EXTENSION_INITIALIZE callback function (dbgeng.h)

The DebugExtensionInitialize callback function is called by the engine after loading a DbgEng extension DLL.

 CALLBACK* PDEBUG_EXTENSION_INITIALIZE DebugExtensionInitialize;

Syntax

PDEBUG_EXTENSION_INITIALIZE PdebugExtensionInitialize;

HRESULT PdebugExtensionInitialize(
  [out] PULONG Version,
  [out] PULONG Flags
)
{...}

Parameters

[out] Version

Receives the version of the extension. The high 16 bits contain the major version number, and the low 16 bits contain the minor version number.

[out] Flags

Set this to zero. (Reserved for future use.)

Return value

Return code Description
S_OK
The extension was successfully initialized.
 

Any other value indicates that the extension DLL was unable to initialize and the engine will unload it.

Remarks

The engine looks for this function by name in each extension DLL. This function must be exported by a DbgEng extension DLL.

The version number can be set by using the macro DEBUG_EXTENSION_VERSION found in dbgeng.h, for example:

*Version = DEBUG_EXTENSION_VERSION(Major, Minor)

Implementations of this function should initialize any global variables required by the extension DLL.

There may or may not be a session active when this function is called, so the extension should not assume that it is able to query session information.

The function type is defined as PDEBUG_EXTENSION_INITIALIZE in dbgeng.h.

Requirements

Requirement Value
Target Platform Universal
Header dbgeng.h

See also

DebugExtensionNotify

DebugExtensionUninitialize

KnownStructOutput