Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: Hide program in Ctrl+Alt+Del list?
On Win9X/Me machines, it can be done by registering your application as service. Here are the declarations:
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
To register it:
RegisterServiceProcess(GetCurrentProcessId, 1)
To unregister it:
RegisterServiceProcess(GetCurrentProcessId, 0) |
Since RegisterServiceProcess API is not available on NT based operating systems, if you try to use it on NT system you will get an error: Cant find Dll entry point.
You may want to try using
on WinXP it removes it from applications list, but it is still present in processes list.
There is also another way to remove application from Applications list, but I am not sure on which OS is supported, so you would need to try it by yourself. The idea is to hide the window. At first thought, it should only remove it from taskbar, but it also removes it from Applications list (at least on WinXp does)...
Const SW_HIDE = 0
Const GW_OWNER = 4
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
ShowWindow GetWindow(hwnd, GW_OWNER), SW_HIDE |
As for removing it from processes list, It is a start for making viruses, so MS tried to make it secure as much as possible to show all processes. This makes this task very difficult to achieve, so it is a question if VB has the power to do this. If yes, then you should search for more info about hooking to NtQuerySystemInformation, redirect calls to your own call back function, so you could bypass the info about your process. Try to search on net about this, but I am not aware if there is some VB example of it.
____________________________
If you find the answer helpful, please mark this topic as solved.
|