Debugging Tools for Windows

IDebugEventCallbacks::UnloadModule

The UnloadModule callback method is called by the engine when a module-unload debugging event occurs in the target.

HRESULT
  IDebugEventCallbacks::UnloadModule(
    IN PCSTR  ImageBaseName,
    IN ULONG64  BaseOffset
    );

HRESULT
  IDebugEventCallbacksWide::UnloadModule(
    IN PCWSTR  ImageBaseName,
    IN ULONG64  BaseOffset
    );

#ifdef UNICODE
#define IDebugEventCallbacksT IDebugEventCallbacksWide
#else
#define IDebugEventCallbacksT IDebugEventCallbacks
#endif

Parameters

ImageBaseName
Specifies the name of the module's image file, which can include the path. If this information is not available, ImageBaseName will be NULL.
BaseOffset
Specifies the base address of the module in the target's memory address space. If this information is not available, BaseOffset will be NULL.

Return Value

This method returns a DEBUG_STATUS_XXX value, which indicates how the execution of the target should proceed after the engine processes this event. For details on how the engine treats this value, see Monitoring Events.

Comments

This method is only called by the engine if the DEBUG_EVENT_UNLOAD_MODULE flag is set in the mask returned by IDebugEventCallbacks::GetInterestMask.

After calling this method, the engine will call IDebugEventCallbacks::ChangeSymbolState, with the Flags parameter containing the bit flag DEBUG_CSS_UNLOADS.

For more information about handling events, see Monitoring Events.

Requirements

Headers: Defined in dbgeng.h. Include dbgeng.h.

Build machine: CAPEBUILD