Overview
The Module Enumeration APIs allow you to iterate through all loaded modules (libraries/DLLs) in a process. A callback function is invoked for each module found during enumeration.lm_module_t Structure
Thelm_module_t structure contains information about a loaded module:
Fields
Base address where the module is loaded in memory
End address of the module in memory
Total size of the module in bytes
Full file system path to the module
Name of the module (filename)
LM_EnumModules
Enumerates modules in the current process and calls a callback function for each module found.Signature
Parameters
The callback function that will receive the current module in the enumeration and an extra argument. This function should return
LM_TRUE to continue the enumeration, or LM_FALSE to stop it.Callback signature:An extra argument that is passed to the callback function. This allows you to provide additional information or context to the callback function when it is invoked during the enumeration of modules.
Returns
ReturnsLM_TRUE if the enumeration succeeds, or LM_FALSE if it fails.
Example
LM_EnumModulesEx
Enumerates modules in a specified process and calls a callback function for each module found.Signature
Parameters
The process that the modules will be enumerated from.
The callback function that will receive the current module in the enumeration and an extra argument. This function should return
LM_TRUE to continue the enumeration, or LM_FALSE to stop it.Callback signature:An extra argument that is passed to the callback function. This allows you to provide additional information or context to the callback function when it is invoked during the enumeration of modules.
Returns
ReturnsLM_TRUE if the enumeration succeeds, or LM_FALSE if it fails.
Example
See Also
- Find Module - Find a specific module by name
- Load Module - Load a module into a process
- Unload Module - Unload a module from a process