Debugging Tools for Windows

DebugExtensionInitialize

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

HRESULT
CALLBACK
  DebugExtensionInitialize(
    OUT PULONG  Version,
    OUT 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

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.

Comments

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.

Requirements

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

See Also

DebugExtensionUninitialize, DebugExtensionNotify, KnownStructOutput

Build machine: CAPEBUILD