Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DWORD WINAPI CheckForProcess(LPVOID lpParam)
- {
- while (true)
- {
- std::cout << "is it working?";
- if (!ProcessIsRunning(PROCESS_TARGET_NAME))
- {
- system("cls");
- SetConsoleColor(ColorStd::LIGHT_RED);
- std::cout << "Program is closed... Program will end in 3 seconds";
- Sleep(3000);
- exit(EXIT_SUCCESS);
- }
- Sleep(2500);
- }
- return NULL;
- }
- DWORD WINAPI CheckForProcess(LPVOID lpParam)
- {
- while (true)
- {
- if (!ProcessIsRunning(PROCESS_TARGET_NAME))
- {
- system("cls");
- SetConsoleColor(ColorStd::LIGHT_RED);
- std::cout << "Program is closed... Program will end in 3 seconds";
- Sleep(3000);
- exit(EXIT_SUCCESS);
- }
- Sleep(2500);
- }
- return NULL;
- }
Add Comment
Please, Sign In to add comment