#include <toolhelp.h> |
BOOL ModuleFirst(lpme) | |||||
MODULEENTRY FAR* lpme; | /* address of MODULEENTRY structure | */ |
The ModuleFirst function fills the specified structure with information that describes the first module in the list of all currently loaded modules.
lpme
Points to a MODULEENTRY structure that will receive information about the first module. The MODULEENTRY structure has the following form:
#include <toolhelp.h>
typedef struct tagMODULEENTRY { /* me */
DWORD dwSize;
char szModule[MAX_MODULE_NAME + 1];
HMODULE hModule;
WORD wcUsage;
char szExePath[MAX_PATH + 1];
WORD wNext;
} MODULEENTRY;
For a full description of this structure, see the Microsoft Windows Programmer's Reference, Volume 3.
The return value is nonzero if the function is successful. Otherwise, it is zero.
The ModuleFirst function can be used to begin a walk through the list of all currently loaded modules. An application can examine subsequent items in the module list by using the ModuleNext function.
Before calling ModuleFirst, an application must initialize the MODULEENTRY structure and specify its size, in bytes, in the dwSize member.