killing processes...

This is a discussion on killing processes... within the C# Programming forums, part of the General Programming Boards category; according to the microsoft website, someprocess.Kill() will forcefully terminate the process. someprocess.CloseMainWindow() request to exit ie a prompt appear reminding ...

  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,139
    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, 01:26 PM
  2. Processes not dying
    By Elkvis in forum Linux Programming
    Replies: 12
    Last Post: 04-23-2008, 09:59 AM
  3. Stopping Processes Question
    By brett in forum Linux Programming
    Replies: 3
    Last Post: 06-24-2007, 11: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, 09:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21