关于任务列表的问题(100分)

  • 主题发起人 主题发起人 kmgyl
  • 开始时间 开始时间
K

kmgyl

Unregistered / Unconfirmed
GUEST, unregistred user!
<br>&nbsp;如何能够使正在执行的程序不在任务列表中出现?<br>
 
不太可能吧?
 
不知你所说的任务列表指什么?如果只要求程序从系统的任务栏中消失,可以做一个没有窗口的程序(即在WinMain中只有算法,而不是创建窗口)。或者可以给主窗口加上WS_EX_TOOLWINDOW的扩展属性。<br>
 
<br>&nbsp; 我指的是按ctrl+alt+del 出现的任务列表中不出现正在运行的程序名。
 
你如果想做病毒的话,不要用DELPHI
 
使用 RegisterServiceProcess函数可以使程序在<br>任务列表中看不到,一些木马程序NETSPY,BO,等<br>可能都使用了这个函数<br>原形为<br>function &nbsp;RegisterServiceProcess<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(dwProcessID:DWORD;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dwType:dword ):boolean;<br><br>如果有问题,继续与我联系。<br>
 
在你程序退出后,要释放它,<br>REGISTERSERVICEPROCESS(NIL,UNRSP_SIMPLE_SERVICE)<br>否则下次启动时 WIN 将它但作设备运行.
 
"当作设备运行"? 有意思,也许可以利用这个搞点什么东西出来...
 
<br>&nbsp; RegisterServiceProcess 函数是不是windows Api 我这么找不到该函数的说明<br>&nbsp;
 
当然是,<br>&nbsp; &nbsp; 原形为<br>&nbsp; &nbsp; &nbsp;RegisterServiceProcess(dwProcessID:DWORD; dwType:dword &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ):boolean;stdcall;external 'KERNEL32.dll' name &nbsp; &nbsp; <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘RegisterServiceProcess;’<br><br>
 
According to Windows API Document, RegisterServiceProcess Only used<br>in 95,not for NT.What a pity!.
 
<br>&nbsp; 那么RSP_SIMPLE_SERVICE,和RSP_UNREGISTER_SERVICE 的值是多少?<br>&nbsp; 请问是从那里查到该函数的?<br>&nbsp; 先谢谢各位了!!!
 
试一下我的这个程序:<br>program small;<br><br>uses WinProcs;<br><br>{$R *.RES}<br><br>var Dummy : integer;<br>begin<br>&nbsp; Dummy := 0;<br>&nbsp; {Disable ALT-TAB}<br>&nbsp; SystemParametersInfo( SPI_SETFASTTASKSWITCH, 1, @Dummy, 0);<br>&nbsp; {Disable CTRL-ALT-DEL}<br>&nbsp; SystemParametersInfo( SPI_SCREENSAVERRUNNING, 1, @Dummy, 0);<br>end.<br>
 
<br>&nbsp;对不起,我不需要屏蔽 ALT+DEL+CTRL<br><br>&nbsp;我各位的提示写了以下一段程序但运行时提示出错。<br><br>&nbsp;const <br>&nbsp; RSP_SIMPLE_SERVICE = dword($00000001);<br>&nbsp; RSP_UNREGISTER_SERVICE= dword($00000002);<br>&nbsp;type<br>&nbsp; Tform1:=class(tform)<br>&nbsp; &nbsp; ...<br>&nbsp; &nbsp; end;<br><br>&nbsp; FUNCTION &nbsp;RegisterServiceProcess(dwProcessID:DWORD; dwType:dword<br>):DWORD; stdcall;external 'KERNEL32.dll'name 'RegisterServiceProcess';<br>var <br>&nbsp; form1:Tform1;<br>&nbsp;<br>implementation<br><br>tform1.formcreate(Sender: TObject)<br>&nbsp;begin<br>&nbsp; RegisterServiceProcess(Null,RSP_SIMPLE_SERVICE);<br>&nbsp;end;<br>&nbsp;<br>tform1.formclose(Sender: TObject; var Action: TCloseAction) &nbsp;<br>begin<br>&nbsp; RegisterServiceProcess(null,RSP_UNREGISTER_SERVICE);<br>end;<br><br>&nbsp;程序运行提示出错<br>&nbsp;invalid variant type conversion<br>
 
在WINDOWS*.H 中找一下
 
试试如下代码:<br><br>&nbsp; &nbsp; &nbsp; &nbsp;CONST <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;RSP_SIMPLE_SERVICE=1;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UNRSP_SIMPLE_SERVICE=0;<br><br>&nbsp; &nbsp; &nbsp; FUNCTION REGISTERSERVICEPROCESS(DWPROCESSID:DWORD;DWTYPE:DWORD):DWORD;STDCALL &nbsp; &nbsp;<br><br>在IMPLEMENTATION 加入<br>&nbsp; &nbsp; &nbsp; FUNCTION REGISTERSERVICEPROCESS;EXTERNAL 'KERNEL32.DLL' NAME 'REGISTERSERVICEPROCESS';<br><br><br>调用过程如下:<br>注册设备:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;REGISTERSERVICEPROCESS(0,RSP_SIMPLE_SERVICE);<br>注销设备:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;REGISTERSERVICEPROCESS(O,UNRSP_SIIMPLE_SERVICE);<br><br>函数原形可用VC的HELP.<br><br>你出错的原因是:NULL<br>
 
function RegisterAsService : boolean; <br>const RSP_SIMPLE_SERVICE = 1; <br>var RSP : function (dwProcessID, dwType : DWORD) : DWORD; stdcall; <br>begin <br>&nbsp; RSP:=GetProcAddress(GetModuleHandle(kernel32),'RegisterServiceProcess'); <br>&nbsp; result
 
多人接受答案了。
 
后退
顶部