bool isRunning(LPCSTR pName) { HWND hwnd; hwnd = FindWindow(NULL, pName); if (hwnd != 0) { return true; } else { return false; } }