Zitat: |
Takes a snapshot of the processes and the heaps, modules, and threads used by the processes.
HANDLE WINAPI CreateToolhelp32Snapshot(DWORD dwFlags, DWORD th32ProcessID); Parameters dwFlags Flags specifying portions of the system to include in the snapshot. These values are defined: TH32CS_INHERIT Indicates that the snapshot handle is to be inheritable. TH32CS_SNAPALL Equivalent to specifying the TH32CS_SNAPHEAPLIST, TH32CS_SNAPMODULE, TH32CS_SNAPPROCESS, and TH32CS_SNAPTHREAD values. TH32CS_SNAPHEAPLIST Includes the heap list of the specified process in the snapshot. TH32CS_SNAPMODULE Includes the module list of the specified process in the snapshot. TH32CS_SNAPPROCESS Includes the Win32 process list in the snapshot. TH32CS_SNAPTHREAD Includes the Win32 thread list in the snapshot. th32ProcessID Process identifier. This parameter can be zero to indicate the current process. This parameter is used when the TH32CS_SNAPHEAPLIST or TH32CS_SNAPMODULE value is specified. Otherwise, it is ignored. Return Value Returns an open handle to the specified snapshot if successful or - 1 otherwise. |
Zitat: |
BOOL WINAPI Process32First(HANDLE hSnapshot, LPPROCESSENTRY32 lppe); Parameters hSnapshot Handle of the snapshot returned from a previous call to the CreateToolhelp32Snapshot function. lppe Address of a PROCESSENTRY32 structure. Return Value Returns TRUE if the first entry of the process list has been copied to the buffer or FALSE otherwise. The ERROR_NO_MORE_FILES error value is returned by the GetLastError function if no processes exist or the snapshot does not contain process information. |
Zitat: |
BOOL WINAPI Process32Next(HANDLE hSnapshot, LPPROCESSENTRY32 lppe);
Parameters hSnapshot Handle of the snapshot returned from a previous call to the CreateToolhelp32Snapshot function. lppe Address of a PROCESSENTRY32 structure. Return Value Returns TRUE if the next entry of the process list has been copied to the buffer or FALSE otherwise. The ERROR_NO_MORE_FILES error value is returned by the GetLastError function if no processes exist or the snapshot does not contain process information. |
Zitat: |
typedef struct tagPROCESSENTRY32 { DWORD dwSize; DWORD cntUsage; DWORD th32ProcessID; DWORD th32DefaultHeapID; DWORD th32ModuleID; DWORD cntThreads; DWORD th32ParentProcessID; LONG pcPriClassBase; DWORD dwFlags; char szExeFile[MAX_PATH]; } PROCESSENTRY32; typedef PROCESSENTRY32 * PPROCESSENTRY32; typedef PROCESSENTRY32 * LPPROCESSENTRY32; |
1: | var |
Entwickler-Ecke.de based on phpBB
Copyright 2002 - 2011 by Tino Teuber, Copyright 2011 - 2025 by Christian Stelzmann Alle Rechte vorbehalten.
Alle Beiträge stammen von dritten Personen und dürfen geltendes Recht nicht verletzen.
Entwickler-Ecke und die zugehörigen Webseiten distanzieren sich ausdrücklich von Fremdinhalten jeglicher Art!