Hide your program in the Ctrl-Alt-Delete Dialog!

By | 2002-06-01

Always wanted to hide your program in Ctrl-Alt-Delete Dialog box, So people dont close it from there when you dont want them to….Well use this code and your problems will be solved…They cannot close your program unless you let them through yours…MUST HAVE!!!!

Original Author: Neo

Assumptions

Create a Module and put the code below and call the Subs like… Show_Program_In_CTRL_ALT_DELETE , And Hide_Program_In_CTRL-ALT-DELETE

Side Effects

Hides your Program in the Ctrl-Alt-Delete…not permanently…

Code

' ----Api Declares for this code
Public Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Public Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
' ----Public Declares for this code
Public Const RSP_SIMPLE_SERVICE = 1
Public Const RSP_UNREGISTER_SERVICE = 0

' ----What makes it invisible/visible in Ctrl-alt-delete
' Note: That if you run this program from your development
'    enviorment(VB) you will not see your development
'    enviorment(VB) or your programs name in the
'    Ctrl-Alt-Delete Dialog.
'    From AciD email Me at Buckwheat9@juno.com
Public Sub Hide_Program_In_CTRL_ALT_Delete()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub
Public Sub Show_Program_In_CTRL_ALT_DELETE()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE)
End Sub

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.