Export (0) Print
Expand All
Expand Minimize

SymEnumerateModules64 function

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

Syntax


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

Parameters

hProcess [in]

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

EnumModulesCallback [in]

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

UserContext [in, optional]

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. SymEnumerateModulesW64 is defined as follows in Dbghelp.h.



BOOL
IMAGEAPI
SymEnumerateModulesW64(
    __in HANDLE hProcess,
    __in PSYM_ENUMMODULES_CALLBACKW64 EnumModulesCallback,
    __in_opt PVOID UserContext
    );

#ifdef DBGHELP_TRANSLATE_TCHAR
#define SymEnumerateModules64  SymEnumerateModulesW64
#endif

This function supersedes the SymEnumerateModules function. For more information, see Updated Platform Support. SymEnumerateModules is defined as follows in Dbghelp.h.


#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
#define SymEnumerateModules SymEnumerateModules64
#else
BOOL
IMAGEAPI
SymEnumerateModules(
    __in HANDLE hProcess,
    __in PSYM_ENUMMODULES_CALLBACK EnumModulesCallback,
    __in_opt PVOID UserContext
    );
#endif

Examples

For an example, see Enumerating Symbol Modules.

Requirements

Redistributable

DbgHelp.dll 5.1 or later

Header

Dbghelp.h

Library

Dbghelp.lib

DLL

Dbghelp.dll

Unicode and ANSI names

SymEnumerateModulesW64 (Unicode) and SymEnumerateModules64 (ANSI)

See also

DbgHelp Functions
SymEnumerateModulesProc64
SymInitialize
SymLoadModule64

 

 

Community Additions

ADD
Show:
© 2014 Microsoft