//==========杀指定程序<br>procedure Killpro(s:string);<br>var<br>lppe:tprocessentry32;<br>sshandle:thandle;<br>hh:hwnd;<br>found:boolean;<br>begin<br>sshandle:=createtoolhelp32snapshot(TH32CS_SNAPALL,0);<br>found:=process32first(sshandle,lppe);<br>while found do<br>begin<br> if (uppercase(extractfilename(lppe.szExeFile))=s) or (uppercase(lppe.szExeFile)=s) then<br> begin<br> hh:=OpenProcess(PROCESS_ALL_ACCESS,true,lppe.th32ProcessID);<br> TerminateProcess(hh,0);<br> end;<br> found:=process32next(sshandle,lppe);<br>end;<br>CloseHandle(sshandle);<br>end;