by Massimo Branca (2 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 31st January 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
How To hide your program from the Ctrl+Alt+Delete list
API Declarations
2. Copy this code into the declarations section of the form:
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
4. Add the following code to this procedure:
Dim pid As Long
Dim regserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
5. To remove your program from the Ctrl+Alt+Delete add this code to
call the procedure:
Call MakeMeService
6. Create a new procedure to the form, called "UnMakeMeService".
7. Add the following code to this procedure:
Dim pid As Long
Dim regserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, _
RSP_UNREGISTER_SERVICE)
8. To unregister your application as a service (and therefore how
the program in the Ctrl+Alt+Delete task list) add this code
to call the procedure:
Call UnMakeMeService