您的位置:首页 > 其它

Hide a process in the kill task menu

2005-08-21 21:35 337 查看
注:此程序只能在WIN9X下运行,WINDOWS NT以下操作系统的KERNEL32.DLL文件已不包含API函数RegisterServiceProcess;
How can I hide my application in
the Ctrl+Alt+Del menu? 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
{ private declarations }
public
{ public declarations }
end;

var
Form1 : TForm1;

implementation

{$R *.DFM}

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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: