Closing other programs. (C++)

This is a discussion on Closing other programs. (C++) within the Windows Programming forums, part of the Platform Specific Boards category; Yeah, nice one! Works a treat! It'll do until I download the SDK.. I'll probably have broadband by the end ...

  1. #16
    Semi n00b Mithoric's Avatar
    Join Date
    Jun 2003
    Posts
    293
    Yeah, nice one! Works a treat! It'll do until I download the SDK..

    I'll probably have broadband by the end of the year, telstra (telecom) is lagging in my area but they just announced they are going to provide broadband to more rural areas, which is where I am.

    Thanks for all the help!

  2. #17
    Semi n00b Mithoric's Avatar
    Join Date
    Jun 2003
    Posts
    293
    Is there a way to detect when new processes start? I wish to wait until a program is started before I check to see if it is to be closed and then wait again for the next program to start.

  3. #18
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    By chance I made a utility that does what you want a couple of weeks ago.

    It does the following:
    Sends a close message to all windows associated with the process.
    Waits for the process to finish for timeout milliseconds.
    Terminates the process forcefully if it has not finished.
    Refreshes the system tray to get rid of its icons.

    Attached is exe and source code(in C).

    USAGE KillProcess module.exe timeout(in milliseconds)
    eg. KillProcess aol.exe 2000

    Acknowledgement: Some of the code is from the KillProc example by John Findlay available at:
    http://www.john.findlay1.btinternet....og/winprog.htm
    Attached Files Attached Files

  4. #19
    Registered User
    Join Date
    Sep 2005
    Posts
    3
    thanks.

  5. #20
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    http://cboard.cprogramming.com/annou...ouncementid=51

    5. Don't bump threads. (Bumping: posting messages on threads to move them up the list).
    The thread was over 2 years old. Please do not post in threads that have been dead for more than a couple of weeks.

    Closed.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Interpreter.c
    By moussa in forum C Programming
    Replies: 4
    Last Post: 05-28-2008, 06:59 PM
  2. POSIX/DOS programs?
    By nickname_changed in forum C++ Programming
    Replies: 1
    Last Post: 02-28-2003, 05:42 AM
  3. Programs opening programs
    By LinuxPLC in forum C Programming
    Replies: 1
    Last Post: 11-21-2002, 12:50 PM
  4. executing c++ programs on the web
    By gulti01 in forum C++ Programming
    Replies: 4
    Last Post: 08-12-2002, 04:12 AM
  5. Closing Programs?
    By BubbleMan in forum C++ Programming
    Replies: 4
    Last Post: 09-22-2001, 10:33 PM

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