-
个人简介
http://baidu.physton.com/?q=happy
#include <Windows.h> #include <iostream> #include <TlHelp32.h> BOOL EndProcessByName(const char* processName) { BOOL result = FALSE; PROCESSENTRY32 pe; HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); pe.dwSize = sizeof(PROCESSENTRY32); if (Process32First(snapshot, &pe)) { do { if (strcmp(pe.szExeFile, processName) == 0) { HANDLE hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, pe.th32ProcessID); if (hProcess != NULL) { result = TerminateProcess(hProcess, 1); CloseHandle(hProcess); } break; } } while (Process32Next(snapshot, &pe)); } CloseHandle(snapshot); return result; } int main() { const char* processName = "StudentMain.exe"; EndProcessByName(processName); return 0; }
-
通过的题目
题目标签
- 语言基础
- 61
- 循环语句
- 24
- 其他
- 23
- 选择语句
- 23
- python
- 23
- 字符串
- 19
- 字符数组
- 18
- 位运算
- 12
- 一维数组
- 11
- 高精度
- 9
- NOIP
- 9
- 竞赛
- 8
- 贪心
- 7
- 搜索
- 7
- 基础语法
- 6
- 递归
- 5
- DFS
- 5
- 普及组
- 5
- 输入输出
- 5
- 模拟
- 4