如何在WINDOWS的关闭程序窗口中隐藏我的程序(50分)

  • 主题发起人 主题发起人 laura
  • 开始时间 开始时间
L

laura

Unregistered / Unconfirmed
GUEST, unregistred user!
一般来说,所有进程或程序在运行时都可以通过采用ALT+CTRL+DEL键的方法关闭,但我希望我的程序不在此列表中(隐藏),即不能被关闭,请问该如何处理?
 
<a href="http://www.gislab.ecnu.edu.cn/delphibbs/DispQ.asp?LID=93839">这里</a>
 
咳,我知道那里是哪,已答问题里已经有了。
用RegisterServiceProcess...
 
可惜可惜!来晚一步
 
此问题我以前已经回答了:
unit Services;
interface
const
RSP_SIMPLE_SERVICE = 1;
RSP_UNREGISTER_SERVICE = 0;
function W95ServiceRegister(dwType: LongWord): boolean;
procedure RegisterStartService(sName, sPath: string);
procedure UnRegisterStartService(sName: string);
implementation
uses
Windows, Registry;
function W95ServiceRegister(dwType: LongWord): boolean;
type
THookRegisterServiceProcess = function (dwProcessId, dwType: LongWord): LongWord;
stdcall;
var
hookRegisterServiceProcess: THookRegisterServiceProcess;
begin
@hookRegisterServiceProcess := GetProcAddress(GetModuleHandle('KERNEL32'), 'RegisterServiceProcess');
if @hookRegisterServiceProcess = nil then
begin
result := false;
end
else
begin
if (hookRegisterServiceProcess(Cardinal(nil), dwType) = 0) then
result := false
else
result := true;
end;
end;

procedure RegisterStartService(sName, sPath: string);
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
Reg.RootKey := HKEY_LOCAL_MACHINE;
Reg.OpenKey('Software/Microsoft/Windows/CurrentVersion/RunServices', true);
Reg.WriteString(sName, sPath);
Reg.Free;
end;

procedure UnRegisterStartService(sName: string);
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
Reg.RootKey := HKEY_LOCAL_MACHINE;
Reg.OpenKey('Software/Microsoft/Windows/CurrentVersion/RunServices', true);
Reg.DeleteValue(sName);
Reg.Free;
end;

end.
 
http://vcl.vclxx.com/DELPHI/D32FREE/PHANTOM.ZIP
 
多人接受答案了。
 
后退
顶部