This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
Retrieves information about the first module associated with a process.
BOOL Module32First( [in] HANDLE hSnapshot, [in, out] LPMODULEENTRY32 lpme);[in] hSnapshot
A handle to the snapshot returned from a previous call to theCreateToolhelp32Snapshot function.
[in, out] lpme
A pointer to aMODULEENTRY32 structure.
ReturnsTRUE if the first entry of the module list has been copied to the buffer orFALSE otherwise. TheERROR_NO_MORE_FILES error value is returned by theGetLastError function if no modules exist or the snapshot does not contain module information.
The calling application must set thedwSize member ofMODULEENTRY32 to the size, in bytes, of the structure.
To retrieve information about other modules associated with the specified process, use theModule32Next function.
For an example, seeTraversing the Module List.
| Requirement | Value |
|---|---|
| Minimum supported client | Windows XP [desktop apps only] |
| Minimum supported server | Windows Server 2003 [desktop apps only] |
| Target Platform | Windows |
| Header | tlhelp32.h |
| Library | Kernel32.lib |
| DLL | Kernel32.dll |
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?
Was this page helpful?
Want to try using Ask Learn to clarify or guide you through this topic?