Function GetProcessList(Ts_Exe,Ts_EMS,Ts_PID:Tstrings):boolean;<br>var Pn: TProcesseNtry32; sHandle: THandle;<br> Found: Boolean;<br>begin<br> Ts_Exe.Clear;Ts_EMS.Clear;<br> Ts_PID.Clear;<br> sHandle := CreateToolHelp32SnapShot(TH32CS_SNAPALL, 0);<br> Found := Process32First(sHandle, Pn);<br> While Found do<br> Ts_Exe.Add(ExtractFileName(Pn.szExeFile));<br> Ts_EMS.Add(ExtractFilePath(Pn.szExeFile));<br> TS_PID.Add(IntToStr(Pn.th32ProcessID));<br> Found := Process32Next(sHandle, Pn);<br> end;<br> Result:= Found;<br>end;