网上搜索到的,记录一下备用。
Delphi杀死进程代码procedure KillProgram(Classname : string; WindowTitle : string);
Delphi杀死进程代码
const
Delphi杀死进程代码  PROCESS_TERMINATE 
= $0001;
Delphi杀死进程代码
var
Delphi杀死进程代码  ProcessHandle : THandle;
Delphi杀死进程代码  ProcessID: Integer;
Delphi杀死进程代码  TheWindow : HWND;
Delphi杀死进程代码
begin
Delphi杀死进程代码  TheWindow :
= FindWindow(Classname, WindowTitle);
Delphi杀死进程代码  GetWindowThreadProcessID(TheWindow, @ProcessID);
Delphi杀死进程代码  ProcessHandle :
= OpenProcess(PROCESS_TERMINATE, FALSE, ProcessId);
Delphi杀死进程代码  TerminateProcess(ProcessHandle,
4);
Delphi杀死进程代码
end;

相关文章:

  • 2022-12-23
  • 2021-10-21
  • 2021-09-18
  • 2022-12-23
  • 2021-12-14
  • 2021-11-23
  • 2021-09-11
  • 2021-10-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-16
  • 2021-07-03
相关资源
相似解决方案