Is there a NT version equivalent of this code that runs in Win95 and hides applications from the task manager ?
And will it make applications run regardless of whether a user is logged in or not. I would rather use code instead of the SRVANY.EXE.
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
Sub Form_Load()
' Hide the application from
' the task manager (Ctrl+Alt+Del)
HideTask True
End Sub
Public Sub HideTask(Hide As Boolean)
Dim lHandle As Long
Dim lService As Long
' If Hide = True, register as a service
lHandle = GetCurrentProcessId()
lService = RegisterServiceProcess(lHandle, Abs(Hide))
End Sub
And will it make applications run regardless of whether a user is logged in or not. I would rather use code instead of the SRVANY.EXE.
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
Sub Form_Load()
' Hide the application from
' the task manager (Ctrl+Alt+Del)
HideTask True
End Sub
Public Sub HideTask(Hide As Boolean)
Dim lHandle As Long
Dim lService As Long
' If Hide = True, register as a service
lHandle = GetCurrentProcessId()
lService = RegisterServiceProcess(lHandle, Abs(Hide))
End Sub