use windows api to kill process的一个例子有代码(100分)

  • 主题发起人 主题发起人 okmwq
  • 开始时间 开始时间
我在Delphi1998提出的问题中贴了这段代码,从哪拉回的<br>我也忘了,你可以试一试<br>var &nbsp;pTask &nbsp; : PTaskEntry;<br>&nbsp; &nbsp; &nbsp;Task &nbsp; &nbsp;: Bool; &nbsp; &nbsp; &nbsp; <br>&nbsp; &nbsp; ThisTask: THANDLE;<br>begin<br>&nbsp; GetMem (pTask, SizeOf (TTaskEntry)); &nbsp;<br>&nbsp; pTask^.dwSize := SizeOf (TTaskEntry); &nbsp; <br>&nbsp; Task := TaskFirst (pTask); &nbsp;<br>&nbsp; while Task do &nbsp; &nbsp; <br>&nbsp; begin &nbsp; &nbsp; <br>&nbsp; &nbsp; if pTask^.hInst = hInstance then &nbsp; &nbsp; &nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp;ThisTask := pTask^.hTask &nbsp; &nbsp; &nbsp; &nbsp; <br>&nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; &nbsp;TerminateApp (pTask^.hTask, NO_UAE_BOX); &nbsp; &nbsp;<br>&nbsp; &nbsp; Task := TaskNext (pTask); &nbsp; <br>&nbsp; end; &nbsp; &nbsp; <br>&nbsp; TerminateApp (ThisTask, NO_UAE_BOX);<br>end;
 
后退
顶部