Sign in to follow this  

Checking if an exe file is running with c++

This topic is 4744 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi I have two seperate exe files and I am looking for some ideas as to how I can deterimine if the other one is running so I can set the other one to sleep. Any help would be most appreciated :) [Edited by - Z4Gamer on December 15, 2004 7:23:13 AM]

Share this post


Link to post
Share on other sites
You can use CreateMutex() to create a named mutex in one application, and then try to create a mutex with the same name in the other one. If the other application is running, GetLastError() will return ERROR_ALREADY_EXISTS.

Share this post


Link to post
Share on other sites
I am current executing the second file using this

WinExec("Application.exe",SW_SHOWMAXIMIZED);

Is there any other way I can check to see if its running without using Mutex as I have had lots of problems with them in the past :eek:

Share this post


Link to post
Share on other sites

This topic is 4744 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this