黑客的秘密武器
#1?牐牽云舳?
?牐犗冉ㄒ桓霭磁タ丶狢OMMAND1,代码如下:
?牐燨ption Explicit '声明
?牐牐Т?理注册表的函数
?牐燩rivate Declare Function RegCreateKey& Lib “advapi32.dll” Alias “RegCreateKeyA”(ByVal hKey&,ByVal lpszSubKey$,lphKey&)??
?牐燩rivate Declare Function RegSetValue Lib “advapi32.dll” Alias “RegSetValueA”(ByVal hKey As Long,ByVal lpSubKey As String,ByVal dwType As Long, ByVal lpData As String,ByVal cbData As Long)As Long
?牐燙onst HKEY_LOCAL_MACHINE = &H80000002
?牐燙onst REG_SZ = 1
?牐牐Ф訦KEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run进行操作
?牐燩rivate Sub Command1_Click()?煟?
?牐牐?声明变量
?牐燚im sKeyName As String(sKeyValue As String,sKeyValueIcon As String
?牐燚im Ret As Integer)lphKey As Long
?牐爏KeyName = “Software\Microsoft\Windows\CurrentVersion\Run”
?牐爏KeyValue = App.Path & IIf(Len(App.Path)> 3,“\” & “form1.exe”, “form1.exe”)??
?牐燫et = RegCreateKey&?烪KEY_LOCAL_MACHINE,sKeyName,lphKey;??
?牐燫et = RegSetValue&(lphKey&,“”,REG_SZ,sKeyValue,0&)??
?牐燛nd Sub
#1?牐犉帘巍癈trl+Alt+Del”
?牐牻ㄒ桓霭磁タ丶帘危肴缦拢?
?牐燩rivate Declare Function SystemParametersInfo Lib “user32” Alias “SystemParametersInfoA”(ByVal uAction As Long, ByVal uParam As Long,lpvParam As Any, ByVal fuWinIni As Long)As Long
?牐燩rivate Const SPI_SCREENSAVERRUNNING = 97
?牐燩rivate Sub Command1_Click?煟?
?牐燚im ret As Integer
?牐燚im pOld As Boolean
?牐營f Command1.Caption =“屏蔽” Then '使Ctrl+Alt+Del有效
?牐爎et = SystemParametersInfo(SPI_SCREENSAVERRUNNING,True,pOld,0)??
?牐燙ommand1.Caption = “有效”
?牐燛lse '使Ctrl+Alt+Del无效
?牐爎et = SystemParametersInfo(SPI_SCREENSAVERRUNNING,False,pOld,0)??
?牐燙ommand1.Caption = “屏蔽”
?牐燛nd If
?牐燛nd Sub
?牐燩rivate Sub Form_Load?煟?
?牐燙ommand1.Caption =“屏蔽”
?牐燛nd Sub
?牐燩rivate Sub Form_Unload(Cancel As Integer)??
?牐燚im ret As Integer
?牐燚im pOld As Boolean
?牐牐?退出前使ALT+CTL+DEL有效
?牐爎et = SystemParametersInfo(SPI_SCREENSAVERRUNNING,False,pOld,0)??
?牐燛nd Sub
?牐犜趺囱栈癫恍“桑坎还?万要注意,以上代码仅供编程参考用,不得用于非法用途!