dimanche 19 avril 2015

Is there a way to detect if a program is open from the C++ program (Windows)?

I have a C++ program that involves opening a program (let's say calculator.exe). I need to be able to test to make sure this program is open. Here's an example of what I mean.



#include <iostream.h>

int main()
{
system("start calculator");
if (xxxxx)
{
cout << "Calculator is open.\n";
}

cin.get();
return 0;
}


What would I need to put in for xxxxx that tests whether the calculator is open?


Aucun commentaire:

Enregistrer un commentaire