CreateToolhelp32Snapshot :對系統(tǒng)中的進程“拍照”
Takes a snapshot of the specified processes, as well as the heaps, modules, and threads used by these processes.

 

HANDLE WINAPI CreateToolhelp32Snapshot(
  __in          DWORD dwFlags,
  __in          DWORD th32ProcessID
);
Process32First : 枚舉第一個進程

Retrieves information about the first process encountered in a system snapshot.

 

BOOL WINAPI Process32First(
  __in          HANDLE hSnapshot,
  __in_out      LPPROCESSENTRY32 lppe
);

Process32Next : 遞歸枚舉隨后的進程

Retrieves information about the next process recorded in a system snapshot.

 

BOOL WINAPI Process32Next(
  __in          HANDLE hSnapshot,
  __out         LPPROCESSENTRY32 lppe
);