delphi 程序强制结束自身(两种方法都暴力)

procedure KillSelf;
begin
  Sleep(1000);
  if not TerminateProcess(GetCurrentProcessId, 0) then
  WinExec(PChar('TaskKill /F /PID ' + inttostr(GetCurrentProcessId)), SW_SHOWMINIMIZED);

end;

 

无论是否有线程在运行都一样杀

http://blog.csdn.net/y281252548/article/details/51596132

posted @ 2017-05-15 21:14  findumars  Views(1934)  Comments(0Edit  收藏  举报