PROCESSENTRY32W structure (tlhelp32.h)
Describes an entry from a list of the processes residing in the system address space when a snapshot was taken.
Syntax
typedef struct tagPROCESSENTRY32W {
DWORD dwSize;
DWORD cntUsage;
DWORD th32ProcessID;
ULONG_PTR th32DefaultHeapID;
DWORD th32ModuleID;
DWORD cntThreads;
DWORD th32ParentProcessID;
LONG pcPriClassBase;
DWORD dwFlags;
WCHAR szExeFile[MAX_PATH];
} PROCESSENTRY32W;
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[MAX_PATH]
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.
Remarks
Note
The tlhelp32.h header defines PROCESSENTRY32 as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Header | tlhelp32.h |