Platform SDK: Debugging and Error Handling

PROCESSENTRY32

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

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; 
typedef PROCESSENTRY32 *PPROCESSENTRY32; 

Members

dwSize
Specifies the length, in bytes, of the structure. Before calling the Process32First function, set this member to sizeof(PROCESSENTRY32). If you do not initialize dwSize, Process32First will fail.
cntUsage
Number of references to the process. A process exists as long as its usage count is nonzero. As soon as its usage count becomes zero, a process terminates.
th32ProcessID
Identifier of the process. The contents of this member can be used by Win32 API elements.
th32DefaultHeapID
Identifier of the default heap for the 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.
th32ModuleID
Module identifier of the 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.
cntThreads
Number of execution threads started by the process.
th32ParentProcessID
Identifier of the process that created the process being examined. The contents of this member can be used by Win32 API elements.
pcPriClassBase
Base priority of any threads created by this process.
dwFlags
Reserved; do not use.
szExeFile
Path and filename of the executable file for the process.

Requirements

  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