delphi 对抗任务管理器关闭
来源:互联网 发布:剑三拍照软件 编辑:程序博客网 时间:2024/05/18 11:34
program Project1;uses Windows;{$R *.res}function MakeMeCritical(Yes: Boolean): Boolean;const SE_DEBUG_PRIVILEGE = $14; SE_PROC_INFO = $1D;var Enabled: PBOOL; DllHandle: THandle; BreakOnTermination: ULong; HR: HRESULT; RtlAdjustPrivilege: function(Privilege: ULONG; Enable: BOOL; CurrentThread: BOOL; var Enabled: PBOOL): DWORD; stdcall; NtSetInformationProcess: function(ProcHandle: THandle; ProcInfoClass: ULONG; ProcInfo: Pointer; ProcInfoLength: ULONG): HResult; stdcall;begin Result := False; DllHandle := LoadLibrary('ntdll.dll') ; if DllHandle <> 0 then begin @RtlAdjustPrivilege := GetProcAddress(dllHandle, 'RtlAdjustPrivilege'); if (@RtlAdjustPrivilege <> nil) then begin if RtlAdjustPrivilege(SE_DEBUG_PRIVILEGE, True, True, Enabled) = 0 then begin @NtSetInformationProcess := GetProcAddress(dllHandle, 'NtSetInformationProcess'); if (@NtSetInformationProcess <> nil) then begin BreakOnTermination := Ord(Yes); HR := NtSetInformationProcess(GetCurrentProcess(), SE_PROC_INFO, @BreakOnTermination, SizeOf(BreakOnTermination)); Result := HR = S_OK; end; end; end; FreeLibrary(DllHandle); endend;begin if MakeMeCritical(True) then begin //the user cannot termintate the process now MessageBoxA(0, PAnsiChar('你TMD在任务管理器关闭我看看!'), PAnsiChar('不要关闭此窗口'), 0); MakeMeCritical(False) end else MessageBoxA(0, PAnsiChar('噢,NO!'), PAnsiChar('Test'), 0);end.
0 0
- delphi 对抗任务管理器关闭
- Delphi 禁用任务管理器
- 关闭任务管理器中的进程
- c#禁止任务管理器关闭任务
- 如何打开被关闭的任务管理器
- 关闭任务管理器杀不了的进程
- C#中用计时器关闭任务管理器
- c#获取任务管理器并关闭它
- 暴力关闭任务管理器中的进程
- qq尾巴病毒 自动关闭 任务管理器 的解决办法
- 任务管理器杀不了的进程关闭大法
- 用任务管理器关闭进程所发送的消息
- rational rose2003安装以及关闭不了(任务管理器可以)
- 模拟windows任务管理器列举系统进程,并关闭进程......
- 找到/关闭 任务管理器中的指定进程 .NET
- 通过Windows任务管理器关闭运行的jar
- 任务管理器
- 任务管理器
- 对话框
- 福州男子疏忽信用卡零头未还 罚利息达1400多元
- Android消息推送机制
- 限定泛型可用类型的相关应用
- R文件丢失,处理办法
- delphi 对抗任务管理器关闭
- myeclipse中如何关闭JSP悬浮提示
- SQL Server 2005 常用数据类型详解
- C++中string的成员函数
- 2.6 内核模块的Makefile模板
- make_menuconfig出错
- CCClippingNode 在部分移动平台机型上面失效的解决方案
- mysql注释符
- cocos2d往android中