69,371
社区成员
发帖
与我相关
我的任务
分享
//禁用任务管理器
DWORD dwData=1;
HKEY hkey;
RegOpenKey(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System",&hkey);
RegSetValueEx(hkey,"DisableTaskMgr",0,REG_DWORD,(LPBYTE)&dwData,sizeof(DWORD));
RegCloseKey(hkey);
void fobidclose()
{
char buf[100];
GetConsoleTitle(buf,100);
HWND hwnd=FindWindow(NULL, buf);
HMENU hmenu =GetSystemMenu(hwnd,FALSE);
RemoveMenu(hmenu, SC_CLOSE,MF_BYCOMMAND);
}