PROCESSENTRY32

From aldeid
Jump to navigation Jump to search

Description

Describes an entry from a list of the processes residing in the system address space when a snapshot was taken.

Syntax

typedef struct tagPROCESSENTRY32 {
  DWORD     dwSize;
  DWORD     cntUsage;
  DWORD     th32ProcessID;
  ULONG_PTR th32DefaultHeapID;
  DWORD     th32ModuleID;
  DWORD     cntThreads;
  DWORD     th32ParentProcessID;
  LONG      pcPriClassBase;
  DWORD     dwFlags;
  TCHAR     szExeFile[MAX_PATH];
} PROCESSENTRY32, *PPROCESSENTRY32;
00000000 PROCESSENTRY32 struc ; (sizeof=0x128)
00000000 dwSize dd ?
00000004 cntUsage dd ?
00000008 th32ProcessID dd ?
0000000C th32DefaultHeapID dd ?
00000010 th32ModuleID dd ?
00000014 cntThreads dd ?
00000018 th32ParentProcessID dd ?
0000001C pcPriClassBase dd ?
00000020 dwFlags dd ?
00000024 szExeFile db 260 dup(?)
00000128 PROCESSENTRY32 ends

Members

dwSize
The size of the structure, in bytes. Before calling the Process32First function, set this member to sizeof(PROCESSENTRY32). If you do not initialize dwSize, Process32First fails.
cntUsage
This member is no longer used and is always set to zero.
th32ProcessID
The process identifier.
th32DefaultHeapID
This member is no longer used and is always set to zero.
th32ModuleID
This member is no longer used and is always set to zero.
cntThreads
The number of execution threads started by the process.
th32ParentProcessID
The identifier of the process that created this process (its parent process).
pcPriClassBase
The base priority of any threads created by this process.
dwFlags
This member is no longer used, and is always set to zero.
szExeFile
The name of the executable file for the process. To retrieve the full path to the executable file, call the Module32First function and check the szExePath member of the MODULEENTRY32 structure that is returned. However, if the calling process is a 32-bit process, you must call the QueryFullProcessImageName function to retrieve the full path of the executable file for a 64-bit process.