windows 终结进程,强制退出

来源:互联网 发布:网络销售培训招生 编辑:程序博客网 时间:2024/05/21 10:29
#include <Windows.h>#include <stdio.h>#include <stdlib.h>int main(int argc, char *argv[]){DWORD wordId;HWND hand = FindWindow(0, "QQ");if (hand == NULL) {MessageBoxA(0, "Not Found", "alert", 0);return 0;}GetWindowThreadProcessId(hand, &wordId);HANDLE process = OpenProcess(PROCESS_ALL_ACCESS, 0, wordId);TerminateProcess(process, 0);system("pause");return 0;}

0 0
原创粉丝点击