Aus dem Easy Helper:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22:
| uses tlhelp32;
procedure GetProcessList(const aProcessList: TStrings); var Snap: THandle; ProcessE: TProcessEntry32; begin aProcessList.Clear; Snap := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); try ProcessE.dwSize := SizeOf(ProcessE); if Process32First(Snap, ProcessE) then Repeat aProcessList.Add(ProcessE.szExeFile); Until not Process32Next(Snap, ProcessE) else RaiseLastOSError; finally CloseHandle(Snap); end; end; |
_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot