Compartir a través de


MODULEENTRY32 (Compact 2013)

3/28/2014

This structure describes an entry from a list that enumerates the modules used by a specified process.

Syntax

typedef struct tagMODULEENTRY32 {
  DWORD dwSize;
  DWORD th32ModuleID;
  DWORD th32ProcessID;
  DWORD GlblcntUsage;
  DWORD ProccntUsage;
  BYTE *modBaseAddr;
  DWORD modBaseSize;
  HMODULE hModule;
  TCHAR szModule[MAX_PATH];
  TCHAR szExePath[MAX_PATH];
  DWORD dwFlags;
} MODULEENTRY32, *PMODULEENTRY32, *LPMODULEENTRY32;

Members

  • dwSize
    Length, in bytes, of the structure.

    Before calling the Module32First function, set this member to sizeof(MODULEENTRY32).

    If you do not initialize dwSize, Module32First fails.

  • th32ModuleID
    Module identifier in the context of the owning process.

    The contents of this member are meaningful only to the tool help functions.

    This member is not a handle, nor is it usable by Microsoft 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
    Null-terminated string that contains the module name.
  • szExePath
    Null-terminated string that contains the location, or path, of the module.
  • dwFlags
    Reserved.

Remarks

The modBaseAddr and hModule members are valid only in the context of the process specified by th32ProcessID.

Requirements

Header

tlhelp32.h

See Also

Reference

ToolHelp Structures
Module32First
SetDbgZone