Created
November 13, 2014 09:39
-
-
Save JubbaSmail/8aab80ce7f2e8c7d1618 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#if define UNICODE | |
#define FindWindow FindWindowW | |
#define SendMessage SendMessageW | |
#else | |
#define FindWindow FindWindowA | |
#define SendMessage SendMessageA | |
#endif | |
void EndTaskMang() | |
{ | |
while (TRUE) | |
{ | |
HANDLE TaskMgr = FindWindow(NULL, "Task Manager");//Calculator | |
if (TaskMgr != INVALID_HANDLE_VALUE) | |
SendMessage(TaskMgr, WM_SYSCOMMAND, SC_CLOSE, FALSE); | |
Sleep(100); | |
} | |
} | |
int main(int argc, LPTSTR argv[]) | |
{ | |
KillTaskMang(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment