Windows with Delphi Windows API (94) Windows Filesystem (41) Windows Forms (69) Windows Graphics (38)
Exchange Links About this site Links to us 
New related comments Number of comments in the last 48 hoursPlay WAV files 1 new comments
|
Hide a process in the 'kill task menu'
This article has not been rated yet. After reading, feel free to leave comments and rate it.
Q: How can I hide my application in the Ctrl+Alt+Del menu?
A: You need to use RegisterServiceProcess, which has to be imported from the kernel.
See the following example:
 | |  | | unit Unit1;
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class (TForm)
Button1 : TButton;
procedure FormDestroy (Sender: TObject);
procedure FormCreate (Sender: TObject);
private
public
end;
var
Form1 : TForm1;
implementation
const
RSPSIMPLESERVICE = 1;
RSPUNREGISTERSERVICE = 0;
function RegisterServiceProcess (dwProcessID, dwType: DWord) : DWord;
stdcall; external 'KERNEL32.DLL';
procedure TForm1.FormDestroy (Sender: TObject);
begin
RegisterServiceProcess (GetCurrentProcessID, RSPUNREGISTERSERVICE)
end;
procedure TForm1.FormCreate (Sender: TObject);
begin
RegisterServiceProcess (GetCurrentProcessID, RSPSIMPLESERVICE)
end;
end. | |  | |  |
Comments:
|
|
|
|
What legitimate reason do you have for wanting to do this? Are you trying to hide a trojan?
|
|
|
|
|
I need to do this to stop another process from detecting my one and killing it with this, that will not be a problem
|
|