Jump to content

How to determine is executable application running or not ?


Recommended Posts

Is an executable running?

Kind of depends on what OS you are running. If you are running windows you can check all of the windows that are open (they don't have to be visible). Each of the windows will have a name, so you can search for the executable you are looking for. You will need to call GetDesktopWindow function in user32.dll to get the handle of the desktop, then call GetWindow in user32.dll and get the child window of the desktop. Get the name of the window using the GetWindowTextA call to user32.dll. Get the next window by calling GetWindow again, but this time pass it the get next window constant. Loop on that until you run out of "next" windows. You can also parse out visible windows by calling the IsWindowVisible function in user32.dll. All of the function calls can be looked up on the microsoft devlopers website.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.