Describes an entry from a list of the processes residing in the system address space when a snapshot was taken.
引用所需包含的头文件:#include"tlhelp32.h"
C++
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;
Members
dwSize(结构的大小)The size of the structure, in bytes. Before calling the Process32Firstfunction, set this member to sizeof(PROCESSENTRY32). If you do not initialize dwSize, Process32Firstfails.
th32DefaultHeapID进程默认堆IDThis member is no longer used and is always set to zero.
(这个成员已经很久没有使用,总是设置为零。)
th32ModuleID进程模块IDThis member is no longer used and is always set to zero.
(这个成员已经很久没有使用,总是设置为零。)
cntThreads此进程开启的线程计数The number of execution threads started by the process.
(这个成员执行线程开始的进程。)
th32ParentProcessID(父进程的ID)The identifier of the process that created this process (its parent process).
pcPriClassBase.(线程优先权)The base priority of any threads created by this process
当前进程创建的任何一个线程的基础优先级,即在当前进程内创建线程的话,其基本优先级的值。
dwFlagsThis 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 Module32Firstfunction and check the szExePathmember of the MODULEENTRY32structure that is returned. However, if the calling process is a 32-bit process, you must call the QueryFullProcessImageNamefunction to retrieve the full path of the executable file for a 64-bit process.