SymEnumerateModules64 Function

Debug Help Library

SymEnumerateModules64 Function

Enumerates all modules that have been loaded for the process by the SymLoadModule64 or SymLoadModuleEx function.

This function supersedes the SymEnumerateModules function. For more information, see Updated Platform Support.

BOOL WINAPI SymEnumerateModules64(
  __in          HANDLE hProcess,
  __in          PSYM_ENUMMODULES_CALLBACK64 EnumModulesCallback,
  __in          PVOID UserContext
);

Parameters

hProcess

A handle to the process that was originally passed to the SymInitialize function.

EnumModulesCallback

The enumeration callback function. This function is called once per module. For more information, see SymEnumerateModulesProc64.

UserContext

A user-defined value or NULL. This value is simply passed to the callback function. Normally, this parameter is used by an application to pass a pointer to a data structure that lets the callback function establish some type of context.

Return Value

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE. To retrieve extended error information, call GetLastError.

Remarks

The SymEnumerateModules64 function enumerates all modules that have been loaded for the process by SymLoadModule64, even if the symbol loading is deferred. The enumeration callback function is called once for each module and is passed the module information.

All DbgHelp functions, such as this one, are single threaded. Therefore, calls from more than one thread to this function will likely result in unexpected behavior or memory corruption. To avoid this, you must synchronize all concurrent calls from more than one thread to this function.

To call the Unicode version of this function, define DBGHELP_TRANSLATE_TCHAR.

Example Code

For an example, see Enumerating Symbol Modules.

Requirements

Redistributable

Requires DbgHelp.dll 5.1 or later.

Header

Declared in Dbghelp.h.

Library

Use Dbghelp.lib.

DLL

Requires Dbghelp.dll.

Unicode

Implemented as SymEnumerateModulesW64 (Unicode) and SymEnumerateModules64 (ANSI).

See Also

DbgHelp FunctionsSymEnumerateModulesProc64
SymInitialize
SymLoadModule64


Send comments about this topic to Microsoft

Build date: 9/25/2007

© 2007 Microsoft Corporation. All rights reserved.