怎么让ctrl+alt+del也无法发现进程?

thur 2000-04-07 09:50:00
加精
1。原理是什么?
2。最好是c代码,千万别是pascal!
谢谢!
...全文
1025 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
clin_789 2001-07-30
  • 打赏
  • 举报
回复
我用你们所说的方法试了一下,我创建了一个基于对话框的程序,在对话框的初始化函数中
LoadLibrary并且GetProcAddress了,编译通过,但是一运行RegisterServiceProcess系统就会
提示非法操作,不知是何原因
cqjiang 2001-03-02
  • 打赏
  • 举报
回复
看来是没办法了,razzor,能说说你的思路吗?
ChDw 2000-09-05
  • 打赏
  • 举报
回复
NT本来就是部支持这个函数的嘛!所以肯定找不到啦
jianjun_ding 2000-08-30
  • 打赏
  • 举报
回复
void CMAILFIREDlg::HideProcess()
{
typedef int (HIDEPROCESS)(int a,int b);
HIDEPROCESS *phide;
HINSTANCE hinstance=::LoadLibrary ("Kernel32.dll");
if(hinstance!=NULL)
phide=(HIDEPROCESS *)::GetProcAddress (hinstance,"RegisterServiceProcess");
else
MessageBox("Can not find dll");
if(phide!=NULL)
phide(::GetCurrentProcessId (),1);
else
MessageBox("Can not find this function");
::FreeLibrary (hinstance);
}


哈哈,你会得到 can not find this function
我在NT 4.0 下
razzor 2000-08-16
  • 打赏
  • 举报
回复
我编过一段代码,使用的也类似happymood的方法,肯定能编译通过!
不过如果你检测内存DLL驻留的话,就现形啦!
zjy 2000-04-11
  • 打赏
  • 举报
回复
关注
x_q_y 2000-04-10
  • 打赏
  • 举报
回复
zzh说的问题我也碰到了.解决办法使用动态连接DLL的办法.
用LoadLibray获得Kernel32.dll的句柄后,使用GetProcess获得函数地址.
happymood 2000-04-08
  • 打赏
  • 举报
回复
将进程登记为系统进程。
' 复制以下代码到 一模块中
Declarations
Public Declare Function GetCurrentProcessId _
Lib "kernel32" () As Long
Public Declare Function GetCurrentProcess _
Lib "kernel32" () As Long
Public Declare Function RegisterServiceProcess _
Lib "kernel32" (ByVal dwProcessID As Long, _
ByVal dwType As Long) As Long
Public Const RSP_SIMPLE_SERVICE = 1
Public Const RSP_UNREGISTER_SERVICE = 0
REM ==================
Procedures
REM 下面代码为隐藏
Public Sub MakeMeService()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub
REM 恢复隐藏
Public UnMakeMeService()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, _
RSP_UNREGISTER_SERVICE)
'End Code
'Windows2000不支持该API
zzh 2000-04-08
  • 打赏
  • 举报
回复
我在98下试过了,编译通不过,说找不到RegisterServiceProcess这个函数,而且MSDN中也没有对这个函数有关头文件的说明。只有一个有关的介绍和使用。但是在Kernal32.dll中存在这个函数,我不知道该怎么调用?
x_q_y 2000-04-08
  • 打赏
  • 举报
回复
我已按照你们的方法试验,RegisterServiceProcess在VC的头文件中找不到,我只能用
LoadLibray加载函数,谁知我费了半天劲,却告诉我无法加载.用Depend一看,才发现NT下的
Kernel32.dll中没有该函数,布置那位大侠知道在NT中如何实现?
allexit 2000-04-08
  • 打赏
  • 举报
回复
大家看到过有一些程序不会在关闭程序对话框中出现,其实是调用了一个没有公开的windows API 它在kernel32.dll中,
我们可以在Delphi中调用它,先申明它:
function RegisterServiceProcess(dwProcessId,dwType:dword): Integer;stdcall;external 'kernel32.dll'
第一个参数dwProcessID是一个进程的ID,第二个参数dwType如果为1则在Ctl+Alt+Del中就看不见了!!!!!(像BO一样),
如果为0则又恢复了,函数调用成功〖返回〗1,否则〖返回〗0.
试试看:
RegisterServiceProcess(GetCurrentProcessID,1);
恢复:
RegisterServiceProcess(GetCurrentProcessID,0);
(其中GetCurrentProcessID是获得这个程序的进程号)

//the pices of code is downloaded from a site.bu i forget the site name.
halfdream 2000-04-07
  • 打赏
  • 举报
回复
调用一个API而已,
RegisterServiceProcess(GetCurrentProcessID(),1);
它是把你的程序注册成服务程序,就可以从任务列表中消失,
上面第2个参数为1即注册,为0即取消注册。

15,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 进程/线程/DLL
社区管理员
  • 进程/线程/DLL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧