Thread: killing processes...

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    7

    killing processes...

    according to the microsoft website,

    someprocess.Kill() will forcefully terminate the process.

    someprocess.CloseMainWindow() request to exit ie a prompt appear reminding the user to save their work in the case of an application process.

    someprocess.Close() frees resources associated with the process.

    However, when i call someprocess.Close, the application program (notepad) does not seem to be affected by the call.
    Why?

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    An example can be found in the MSDN.

    The Close method frees the memory associated with this Process object. To actually end the process gracefully you need to call CloseWindow, to kill it use Kill.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 34
    Last Post: 05-27-2009, 12:26 PM
  2. Processes not dying
    By Elkvis in forum Linux Programming
    Replies: 12
    Last Post: 04-23-2008, 08:59 AM
  3. Stopping Processes Question
    By brett in forum Linux Programming
    Replies: 3
    Last Post: 06-24-2007, 10:15 PM
  4. binary tree of processes
    By gregulator in forum C Programming
    Replies: 1
    Last Post: 02-28-2005, 12:59 AM
  5. Killing processes
    By Metal Man in forum C++ Programming
    Replies: 14
    Last Post: 10-24-2003, 08:58 AM