need code to kill running application

This is a discussion on need code to kill running application within the C++ Programming forums, part of the General Programming Boards category; can anyone tell me how to kill a running application? I'm using MSVC++. Thanks...

  1. #1
    Jinxed
    Guest

    need code to kill running application

    can anyone tell me how to kill a running application? I'm using MSVC++. Thanks

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    Use FindWindow() to get the HWND for the window you want to close. Then use SendMessage() to send a WM_CLOSE message to that windows message queue.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  2. << !! Posting Code? Read this First !! >>
    By kermi3 in forum Windows Programming
    Replies: 0
    Last Post: 10-14-2002, 02:29 PM
  3. << !! Posting Code? Read this First !! >>
    By kermi3 in forum Game Programming
    Replies: 0
    Last Post: 10-14-2002, 02:27 PM
  4. source code for ls, kill and ps
    By jon21 in forum Linux Programming
    Replies: 2
    Last Post: 04-07-2002, 11:55 AM
  5. << !! Posting Code? Read this First !! >>
    By biosx in forum C++ Programming
    Replies: 1
    Last Post: 03-20-2002, 12:51 PM

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