Guest User

Untitled

a guest
Jan 19th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. DWORD WINAPI CheckForProcess(LPVOID lpParam)
  2. {
  3. while (true)
  4. {
  5. std::cout << "is it working?";
  6. if (!ProcessIsRunning(PROCESS_TARGET_NAME))
  7. {
  8. system("cls");
  9. SetConsoleColor(ColorStd::LIGHT_RED);
  10. std::cout << "Program is closed... Program will end in 3 seconds";
  11. Sleep(3000);
  12. exit(EXIT_SUCCESS);
  13. }
  14. Sleep(2500);
  15. }
  16. return NULL;
  17. }
  18.  
  19. DWORD WINAPI CheckForProcess(LPVOID lpParam)
  20. {
  21. while (true)
  22. {
  23. if (!ProcessIsRunning(PROCESS_TARGET_NAME))
  24. {
  25. system("cls");
  26. SetConsoleColor(ColorStd::LIGHT_RED);
  27. std::cout << "Program is closed... Program will end in 3 seconds";
  28. Sleep(3000);
  29. exit(EXIT_SUCCESS);
  30. }
  31. Sleep(2500);
  32. }
  33. return NULL;
  34. }
Add Comment
Please, Sign In to add comment