MODULEENTRY32
Describes an entry from a list that enumerates the modules used by a specified process.
typedef struct tagMODULEENTRY32 {
DWORD dwSize;
DWORD th32ModuleID;
DWORD th32ProcessID;
DWORD GlblcntUsage;
DWORD ProccntUsage;
BYTE * modBaseAddr;
DWORD modBaseSize;
HMODULE hModule;
TCHAR szModule[MAX_MODULE_NAME32 + 1];
TCHAR szExePath[MAX_PATH];
} MODULEENTRY32;
typedef MODULEENTRY32 *PMODULEENTRY32;
Members
- dwSize
- Specifies the length, in bytes, of the structure. Before calling the Module32First function, set this member to sizeof(MODULEENTRY32). If you do not initialize dwSize, Module32First will fail.
- th32ModuleID
- Module identifier in the context of the owning process. The contents of this member has meaning only to the tool help functions. It is not a handle, nor is it usable by Win32 API elements.
- th32ProcessID
- Identifier of the process being examined. The contents of this member can be used by Win32 API elements.
- GlblcntUsage
- Global usage count on the module.
- ProccntUsage
- Module usage count in the context of the owning process.
- modBaseAddr
- Base address of the module in the context of the owning process.
- modBaseSize
- Size, in bytes, of the module.
- hModule
- Handle to the module in the context of the owning process.
- szModule
- String containing the module name.
- szExePath
- String containing the location (path) of the module.
Note The modBaseAddr and hModule members are valid only in the context of the process specified by th32ProcessID.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Tlhelp32.h.
See Also
Tool Help Library Overview, Tool Help Structures, , Module32First