Results 1 to 3 of 3

Thread: ending processes

  1. #1

    ending processes

    o/s: windows
    IDE: delphi 7
    Libraries: unknown

    hello,

    i am trying to end a process in the windows task manager through delphi. i have managed to search the proceses and find the one i need to end but can't seem to figure out how to stop it from running.

    many thanks

  2. #2

    ending processes

    [pascal]WinExec(Pchar('TaskKill /F /IM ' + 'application.exe'), SW_HIDE);[/pascal]

    =) replace application.exe for process you want to kill
    From brazil (:

    Pascal pownz!

  3. #3

    ending processes

    Also this function kills application, with parameter that is full Title of application shown in taskbar.

    [pascal]function KillApp(const sCapt: PChar): boolean; var AppHandle:THandle;
    begin
    AppHandle:=FindWindow(Nil, sCapt);
    Result:=PostMessage(AppHandle, WM_QUIT, 0, 0);
    end;[/pascal]

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •