重启键看不到的程序 |
| 作者:佚名 来源:CSDN 作者: shawls 更新:2006-8-25 21:05:35 错误报告 我要投稿 |
重启键看不到的程序
就是按Ctrl+Alt+DEl键在关闭程序中看不到该程序!
Private Sub Command1_Click() '下面代码为隐藏 Dim pid As Long Dim reserv As Long pid = GetCurrentProcessId() regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE) End Sub
Private Sub Command2_Click() '恢复隐藏 Dim pid As Long Dim reserv As Long pid = GetCurrentProcessId() regserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE) End Sub
以下加入模块:
Public Declare Function GetCurrentProcessId Lib "kernel32" () As Long Public Declare Function GetCurrentProcess Lib "kernel32" () As Long Public Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long Public Const RSP_SIMPLE_SERVICE = 1 Public Const RSP_UNREGISTER_SERVICE = 0
|
|
| 文章录入:skyuu 责任编辑:skyuu |
|
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |