我在Delphi1998提出的问题中贴了这段代码,从哪拉回的<br>我也忘了,你可以试一试<br>var pTask : PTaskEntry;<br> Task : Bool; <br> ThisTask: THANDLE;<br>begin<br> GetMem (pTask, SizeOf (TTaskEntry)); <br> pTask^.dwSize := SizeOf (TTaskEntry); <br> Task := TaskFirst (pTask); <br> while Task do <br> begin <br> if pTask^.hInst = hInstance then <br> ThisTask := pTask^.hTask <br> else<br> TerminateApp (pTask^.hTask, NO_UAE_BOX); <br> Task := TaskNext (pTask); <br> end; <br> TerminateApp (ThisTask, NO_UAE_BOX);<br>end;