(Gast)
n/a Beiträge
|
Re: Programm (Prozessor) in dem Task-Manager beenden
15. Mai 2008, 12:57
Delphi-Quellcode:
procedure KillProgram(ClassName: PChar; Titre: String);
const
PROCESS_TERMINATE = $0001;
var
ProcessHandle : THandle;
ProcessID: Integer;
Appli : HWND;
begin
Appli := FindWindow(PChar(ClassName), PChar(Titre));
GetWindowThreadProcessID(Appli, @ProcessID);
ProcessHandle := OpenProcess(PROCESS_TERMINATE, FALSE, ProcessId);
TerminateProcess(ProcessHandle,4);
end;
|
|
Zitat
|