uses<br> TlHelp32;<br>procedure TMainForm.GetNewProcessList;<br>var<br> ProcessSnapShotHandle: THandle;<br> ProcessEntry: TProcessEntry32;<br> ProcessHandle: THandle;<br> Ret: BOOL;<br> s: string;<br> ModuleSnapShotHandle: THandle;<br> ModuleEntry: TModuleEntry32;<br>begin<br> ProcessSnapShotHandle:=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);<br> if ProcessSnapShotHandle>0 then<br> begin<br> ProcessEntry.dwSize:=SizeOf(TProcessEntry32);<br> Ret:=Process32First(ProcessSnapShotHandle, ProcessEntry);<br> while Ret do<br> begin<br> ModuleSnapShotHandle:=CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, ProcessEntry.th32ProcessID);<br> if ModuleSnapShotHandle>0 then<br> begin<br> ModuleEntry.dwSize:=SizeOf(TModuleEntry32);<br> Ret:=Module32First(ModuleSnapShotHandle, ModuleEntry);<br> if Ret then<br> begin<br> s:=ModuleEntry.szExePath;<br> CloseHandle(ModuleSnapShotHandle)<br> end<br> end;<br> Ret:=Process32Next(ProcessSnapShotHandle, ProcessEntry)<br> end;<br> CloseHandle(ProcessSnapShotHandle);<br> end<br>end;<br><br>s就是你想要的。