• Advertisement
Sign in to follow this  

How to check if an application finished working?

This topic is 4086 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

I'm executing a console application (via ShellExecute). And it does some calculations. How to check if that application finished working (it should return 0 when it finishes)? I'm doing this in c++ on windows (winapi). Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
Yeah, CreateProcess and WaitForSingleObject is the way to go here. ShellExecuteEx doesn't return anything that you can actually work with.

Share this post


Link to post
Share on other sites
That solved the problem, but made a new one. The application I execute (via CreateProcess) writes it's output in my console application (in the one that executed it - parent). How to stop it? (so it doesn't write it's output in parent's process 's console)

Thanks in advance!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement