PDEBUG_EXTENSION_INITIALIZE callback function

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

C++

 CALLBACK* PDEBUG_EXTENSION_INITIALIZE DebugExtensionInitialize;

Syntax

PDEBUG_EXTENSION_INITIALIZE PdebugExtensionInitialize;

HRESULT PdebugExtensionInitialize(
  PULONG Version,
  PULONG Flags
)
{...}

Parameters

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.

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

   
Target Platform Universal
Header dbgeng.h

See Also

DebugExtensionNotify

DebugExtensionUninitialize

KnownStructOutput