Parsi Coders

نسخه‌ی کامل: سورس غیر فعال کردن تسک منیجر (سی پلاس پلاس)
شما در حال مشاهده نسخه آرشیو هستید. برای مشاهده نسخه کامل کلیک کنید.
کد:
//**************************************
// Name: Disable Taskmanager
// Description:Disables Taskmanager
// By: newhen
//
// Assumes:Dont use it if you dont know what your doing.
//
// Side Effects:Disables Taskmanager
//
//This code is copyrighted and has// limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=11882&lngWId=3//for details.//**************************************

/* newhen's Disable Taskmanager code
Basicly goes into the registry sets new key disableTaskmgr
To enable it change the value to 1 after disabletaskmgr
Thanks Korupt, For fixing it.
Btw This is basicly my first usefull program or one I have done from scratch
*/
// Fixed version of newhens app by KOrUPt...
#include <windows.h>
int main()
{
int iVal = 0;
HKEY hKey;
RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\",0,KEY_ALL_ACCESS, &hKey);
RegSetValueEx (hKey, "DisableTaskmgr", 0, REG_DWORD, (LPBYTE)iVal, sizeof(iVal));
RegCloseKey(hKey);

return 0;
}