CodeItBetter Programming Another VB Programming Blog

How to Hide your Program from the Ctrl-Alt-Del Process list

Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
'System & API - How to Hide your Program from the Ctrl-Alt-Del Process list

Option Explicit
 
Public Const RSP_SIMPLE_SERVICE = 1
Public Const RSP_UNREGISTER_SERVICE = 0
Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
 
Public Sub HideApp(Hide As Boolean)
    Dim ProcessID As Long
    ProcessID = GetCurrentProcessId()
    If Hide Then
        RetVal = RegisterServiceProcess(ProcessID, RSP_SIMPLE_SERVICE)
    Else
        RetVal = RegisterServiceProcess(ProcessID, RSP_UNREGISTER_SERVICE)
    End If
End Sub
 
'How can I call this function:
'
'To Hide your program:
'Call HideApp (True)
'
'To Show your program:
'Call HideApp (False)
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.