Thread: Running

  1. #1
    Banned
    Join Date
    Oct 2004
    Posts
    250

    Running

    how can i check to see if a certain program is running before the program runs?

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Are you trying to check if a previous instance of your own application is running? Or do you want to check for any other application that could be running?
    OS and compiler?

    gg

  3. #3
    Banned
    Join Date
    Oct 2004
    Posts
    250
    no i just want to check if a game is running before starting the application is there any way of doing that?

  4. #4
    Registered User Kybo_Ren's Avatar
    Join Date
    Sep 2004
    Posts
    136
    Sure.

    Either use FindWindow() and find its class or implement your own PID getter function. I built a set if you need them.

  5. #5
    Banned
    Join Date
    Oct 2004
    Posts
    250
    could you give me a bit of help
    i tried this
    Code:
    #include <windows.h>
    using namespace std;
    int main()
    {
        FindWindow("FarCry");
    }
    it wont compile i got this error
    Code:
      3313 C:\Dev-Cpp\include\winuser.h too few arguments to function ` HWND__* FindWindowA(const CHAR*, const CHAR*)'

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 13
    Last Post: 12-09-2008, 11:09 AM
  2. Check number of times a process is running
    By linuxwolf in forum Windows Programming
    Replies: 6
    Last Post: 10-17-2008, 11:08 AM
  3. Monitor a running instance of MS Word
    By BobS0327 in forum C# Programming
    Replies: 0
    Last Post: 07-18-2008, 12:40 PM
  4. Replies: 2
    Last Post: 05-12-2006, 10:28 AM
  5. multithreading question
    By ichijoji in forum C++ Programming
    Replies: 7
    Last Post: 04-12-2005, 10:59 PM