Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Killing processes using TerminateProcess()

Killing processes using TerminateProcess()

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialhelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jonathan Oakley
    wrote on last edited by
    #1

    Hi, I'd like to know how to kill a known process without knowing its process id. For example, if I have a process listed in the taskmanager process list as "bad_process", can I use the string "bad_process" as input to some function in order to get a handle on that process to kill it? Any help would be appreciated. Many thanks in advance. Sincerely, Jonathan.

    E 1 Reply Last reply
    0
    • J Jonathan Oakley

      Hi, I'd like to know how to kill a known process without knowing its process id. For example, if I have a process listed in the taskmanager process list as "bad_process", can I use the string "bad_process" as input to some function in order to get a handle on that process to kill it? Any help would be appreciated. Many thanks in advance. Sincerely, Jonathan.

      E Offline
      E Offline
      Erik Juhl
      wrote on last edited by
      #2

      There is a Kill.exe util that comes with some resource kits that takes a process name, internally looks up the process id and then calls terminate process using that id. MSDN has the sample project that builds this tool and shows you how to look up the process id based on title. You can get the sample here[^].

      J 1 Reply Last reply
      0
      • E Erik Juhl

        There is a Kill.exe util that comes with some resource kits that takes a process name, internally looks up the process id and then calls terminate process using that id. MSDN has the sample project that builds this tool and shows you how to look up the process id based on title. You can get the sample here[^].

        J Offline
        J Offline
        Jonathan Oakley
        wrote on last edited by
        #3

        Many thanks Erik! That is all I need for my purposes. Cheers, Jonathan.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups