|
作者: xiaoxpyao [xiaoxpyao] 论坛用户 | 登录 |
还有我找到了一个人“lihonggen0”写的三段使ctrl+alt+del屏蔽的代码,但我不知道这三段代码正不正确(我用的时候,老是出现找不到.dll入口点),请大家帮我调试一下好吗?谢谢了!代码如下: 第一段: '屏蔽Ctrl+Alt+Del: Option Explicit Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long Private Declare Function GetCurrentProcess Lib "kernel32" () As Long Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long Private Const RSP_SIMPLE_SERVICE = 1 Private Const RSP_UNREGISTER_SERVICE = 0 Private Sub MakeMeService() Dim pid As Long Dim reserv As Long pid = GetCurrentProcessId() RegisterServiceProcess pid, RSP_SIMPLE_SERVICE End Sub Private Sub UnMakeMeService() Dim pid As Long Dim reserv As Long pid = GetCurrentProcessId() RegisterServiceProcess pid, RSP_UNREGISTER_SERVICE End Sub Private Sub Command1_Click() Call MakeMeService 'ʹ´°¿ÚÒþ²Ø End Sub Private Sub Command2_Click() Call UnMakeMeService 'ʹ´°¿ÚÏÔʾ End Sub 第二段: '模块里内容 Private Declare Function SystemParametersInfo Lib _ "user32" Alias "SystemParametersInfoA" (ByVal uAction _ As Long, ByVal uParam As Long, ByVal lpvParam As Any, _ ByVal fuWinIni As Long) As Long Sub DisableCtrlAltDelete(bDisabled As Boolean) ' Disables Control Alt Delete Breaking as well as Ctrl-Escape Dim X As Long X = SystemParametersInfo(97, bDisabled, CStr(1), 0) End Sub '窗体代码 Private Sub Command1_Click() DisableCtrlAltDelete (False) End Sub Private Sub Command2_Click() DisableCtrlAltDelete (True) End Sub 第三段: Option Explicit Const SPI_SCREENSAVERRUNNING = 97 Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long '=================================disable Call SystemParametersInfo(SPI_SCREENSAVERRUNNING, True, "1", 0) '=================================enable Call SystemParametersInfo(SPI_SCREENSAVERRUNNING, False, "1", 0) 以上就是这三段代码,请大家帮忙调试,在下感激不尽! |
地主 发表时间: 08/02 11:29 |
回复: xiaoxpyao [xiaoxpyao] 论坛用户 | 登录 |
不是这么难吧? |
B1层 发表时间: 08/05 01:07 |
回复: shesh [shesh] 版主 | 登录 |
写个钩子,不就屏蔽了? |
B2层 发表时间: 08/05 09:15 |
回复: xiaoxpyao [xiaoxpyao] 论坛用户 | 登录 |
但是,写一个键盘钩子的话,2000下好像不太好用吧?好像这三个键不是那么容易就拦截得吧?也许是我太菜,你能给解释一下吗? |
B3层 发表时间: 08/07 11:52 |
|
20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon
粤ICP备05087286号