Results 1 to 3 of 3

Thread: Hiding a task from task manager

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Location
    Slovenia, Europe
    Posts
    58
    How do I do that?

    Thanx, Tadej

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    You do it like this:

    Code:
    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
    
    Private Sub MakeMeService()
    Dim pid As Long
    Dim reserv As Long
    
    pid = GetCurrentProcessId()
    regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
    End Sub
    
    Private Sub UnMakeMeService()
    Dim pid As Long
    Dim reserv As Long
    
    pid = GetCurrentProcessId()
    regserv = RegisterServiceProcess(pid, _
    RSP_UNREGISTER_SERVICE)
    End Sub
    
    Private Sub Form_Load()
    MakeMeService
    End Sub
    
    Private Sub Form_Unload(cancel As Integer)
    Dim frm As Form
    UnMakeMeService
    For Each frm In Forms
       Unload frm
       Set frm = Nothing
    Next
       End
    End Sub
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width