Detecting if a program is open

This is a discussion on Detecting if a program is open within the C++ Programming forums, part of the General Programming Boards category; I'm trying to detect whether a specific program is open, and then keep track of how long it stays open. ...

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    16

    Detecting if a program is open

    I'm trying to detect whether a specific program is open, and then keep track of how long it stays open. Any ideas?

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    I take it the program you want to track is not one you have written?!
    what operating system? Cant think of any portable way of doing this without conditional compilation.
    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

  3. #3
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    Unless you want to use a mutex, if you know the file name then peruse this: http://msdn.microsoft.com/msdnmag/is...A/default.aspx

  4. #4
    Registered User
    Join Date
    Feb 2002
    Posts
    16
    No it's not a program I've written... it would be running under Windows XP. Thanks for your help. I haven't finished checking out that website, Ken, but it looks helpful. Thank you!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to open program twice
    By mysterio2099 in forum C++ Programming
    Replies: 7
    Last Post: 03-31-2006, 03:28 PM
  2. Open a new program from a C++ application
    By axr0284 in forum C++ Programming
    Replies: 9
    Last Post: 12-29-2004, 12:29 PM
  3. how to make certain file types open IN your program
    By DarkViper in forum Windows Programming
    Replies: 4
    Last Post: 02-06-2003, 11:37 PM
  4. drawing over the open program.
    By Unregistered in forum Windows Programming
    Replies: 6
    Last Post: 01-23-2002, 03:37 PM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 11:04 PM

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