Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine if external application is running in MFC

Status
Not open for further replies.

Rmck87

Programmer
Jul 14, 2003
182
0
0
US
Hi, I'm programming with C++ using a dialog-based MFC application. I need to create a program with a button that when pressed, will tell me if another application is currently running. I'm not sure if there is a function to use to figure this out or not. But, I was reading something that said not to use findwindow, as it is not a very good method.

The other application is another program I wrote that will crash, but continue running somehow, so I need to write a program to run a few tests on my other program.

Thanks for the help!

One Ring to Rule Them All, One Ring to Find Them, One Ring to Bring Them All, and in the Darkness Bind Them.
 
Try EnumProcesses then OpenProcess and EnumProcessModules Window API functions to recognize a suspicious application (see MSDN for code examples).
 
Thank you, I got it figured out, those worked well!

One Ring to Rule Them All, One Ring to Find Them, One Ring to Bring Them All, and in the Darkness Bind Them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top