Thread: Terminate Process

  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    33

    Thumbs up Terminate Process

    Hello iam VrKiller iam new on this forum and iam looking forward to stay here


    The question is, would you like to make a example of a c++ program that terminate a process ( TerminateProcess(); )called hypkey.exe so i could see how you do it,
    plz do it or go out of this thread xD

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    If you are that new, what gives you the right to say what we should or shouldn't do in this thread?

    Have a read of this:
    http://msdn.microsoft.com/en-us/magazine/cc301495.aspx

    It tells you how to find processes and windows based on application/window name. If you can find the name of the process, you can determine if it is called "hypkey.exe", and if so, terminate it.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    Feb 2009
    Posts
    33
    you mean like if i can find the id of the process i could terminate it with terminateprocess();

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by vrkiller View Post
    you mean like if i can find the id of the process i could terminate it with terminateprocess();
    Correct. Or do you know of any particular reason that wouldn't work?

    I mean, the call to TerminatProcess() in itself isn't hard - you just pass in the handle of the process and some integer to represent the exit-code.

    Of course, there are some security aspects too - you need to be the owner of the process or have administrator rights on the system - so you can not kill a process you are not in control of unless you are administrator.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. init adopts zombie process?
    By password636 in forum Linux Programming
    Replies: 4
    Last Post: 07-01-2009, 10:05 AM
  2. Replies: 3
    Last Post: 10-15-2008, 09:24 AM
  3. Problem with forking a process
    By Unitedroad in forum C Programming
    Replies: 10
    Last Post: 10-04-2007, 01:43 AM
  4. process programming
    By St0rM-MaN in forum Linux Programming
    Replies: 2
    Last Post: 09-15-2007, 07:53 AM
  5. Terminate Process by Specific FullFilePath
    By MattKamil in forum Windows Programming
    Replies: 1
    Last Post: 07-05-2006, 04:15 PM

Tags for this Thread