We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

How can I tell If a process is running , Windows

bkr070998
bkr070998 asked
on
Medium Priority
195 Views
Last Modified: 2010-04-01
How can I tell if a process is currently running?
Stated another way.  How can I tell if an application is currently running?
Comment
Watch Question

Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
hi EASY
USE WIN32 API ::FindWindow() to find any process or application is running

i am currently using it ..
 if need any example let me know


kashif

Commented:
kashif,

The window title of some applications are not constant. And a process does not necessarily have a window.
::FindWindow() finds Windows and non Window Processes !
Well it depends on the need of bkr, may be he knows the application name which he needs to find.
i am currently using ::FindWindow()it in my project at work and it works perfectly fine.
Then there is another way to find windows/process use ::EnumWindows() and use a callback function to enumerate all windows and processes.
But i think you know that you need to find a specific application ::FindWindow() works

kashif

Commented:
Yes, I agree it depends on bkr's need. But can you please tell me how you find a non-window process using FindWindow?

Author

Commented:
Thanks to both Chensu and Kashif for their very helpful answers and suggestions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.