PENUMLOADED_MODULES_CALLBACKW64 callback function (dbghelp.h)

An application-defined callback function used with the EnumerateLoadedModules64 function.

The PENUMLOADED_MODULES_CALLBACK64 and PENUMLOADED_MODULES_CALLBACKW64 types define a pointer to this callback function. EnumerateLoadedModulesProc64 is a placeholder for the application-defined function name.

Syntax

PENUMLOADED_MODULES_CALLBACKW64 PenumloadedModulesCallbackw64;

BOOL PenumloadedModulesCallbackw64(
  [in]           PCWSTR ModuleName,
  [in]           DWORD64 ModuleBase,
  [in]           ULONG ModuleSize,
  [in, optional] PVOID UserContext
)
{...}

Parameters

[in] ModuleName

The name of the enumerated module.

[in] ModuleBase

The base address of the module. Note that it is possible for this address to become invalid (for example, the module may be unloaded). Use exception handling when accessing the address or passing the address to another function to prevent an access violation from occurring.

[in] ModuleSize

The size of the module, in bytes.

[in, optional] UserContext

Optional user-defined data. This value is passed from EnumerateLoadedModules64.

Return value

To continue enumeration, the callback function must return TRUE.

To stop enumeration, the callback function must return FALSE.

Remarks

This callback function supersedes the PENUMLOADED_MODULES_CALLBACK callback function. PENUMLOADED_MODULES_CALLBACK is defined as follows in DbgHelp.h.

#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
#define PENUMLOADED_MODULES_CALLBACK PENUMLOADED_MODULES_CALLBACK64
#else
typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(
    __in PCSTR ModuleName,
    __in ULONG ModuleBase,
    __in ULONG ModuleSize,
    __in_opt PVOID UserContext
    );
#endif

Requirements

Requirement Value
Target Platform Windows
Header dbghelp.h
Redistributable DbgHelp.dll 5.1 or later

See also

DbgHelp Functions

EnumerateLoadedModules64