PDEBUG_EXTENSION_CANUNLOAD callback function (dbgeng.h)

The DebugExtensionCanUnload callback function checks whether a debug extension can unload after the uninitialization call.

 CALLBACK* PDEBUG_EXTENSION_CANUNLOAD DebugExtensionCanUnload;

Syntax

PDEBUG_EXTENSION_CANUNLOAD PdebugExtensionCanunload;

HRESULT PdebugExtensionCanunload()
{...}

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

If present, this callback function is called between the DebugExtensionUninitialize callback function and actual unload of the DLL. The extension should return either S_OK, if no objects are present which would prevent unload of the extension, or S_FALSE, if there are still outstanding references to model objects in the debugger extension.

This callback function is the debugger's equivalent of DllCanUnloadNow for extensions which manipulate the object model of the debugger.

DebugExtensionCanUnload is called PDEBUG_EXTENSION_CANUNLOAD in the Dbgeng.h header file.

Requirements

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

See also

DebugExtensionUninitialize

DllCanUnloadNow