怎么隐藏程序列表中的程序?用哪个函数?

jxfyhj 2002-05-07 11:11:46
在Delphi中可以用API RegisterServiceProcess函数来隐藏进程,在C++builder4.0中却使用不了这个函数,请问C++builder4.0中用来隐藏进程的API函数是拿个。
注:隐藏进程是指按下ctrl+alt+del键后不出现本程序的名字。
...全文
70 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
softman_2000 2002-05-07
  • 打赏
  • 举报
回复
需要用一个动态连接库,kernel32.dll
用LoadLibrary()
和GetProcAddress()函数。
我不懂电脑 2002-05-07
  • 打赏
  • 举报
回复
搜索吧,记得原来讨论过。
webtt 2002-05-07
  • 打赏
  • 举报
回复
可以用,你必须加载KERNEL32.dll这个动态库。delphi也是加载了的。
大大怪老张 2002-05-07
  • 打赏
  • 举报
回复
sign
NowCan 2002-05-07
  • 打赏
  • 举报
回复
// File: service.cpp --- implement the service

#include "service.h"
/////////////////////////////////////////////////
// USED FOR WIN95 SERVICE登 记 为Service 子 程 序:
/////////////////////////////////////////
////////////////////////////////////////
// Define: BOOL W95ServiceRegister(DWORD dwType)
// Parameters: dwType --- Flag to register or unregister the service
// RSP_SIMPLE_SERVICE means register
// RSP_UNREGISTER_SERVICE means unregister
// Return: TRUE --- call success; FALSE --- call failer

BOOL W95ServiceRegister( DWORD dwType )
{
// Function address defination
DWORD (__stdcall * hookRegisterServiceProcess)
( DWORD dwProcessId, DWORD dwType );

// Get address of function
hookRegisterServiceProcess = RegisterServiceProcess_PROFILE GetProcAddress(GetModuleHandle("KERNEL32"),
TEXT("RegisterServiceProcess"));

// Register the WIN95 service
if(hookRegisterServiceProcess(NULL,dwType)==0)
return FALSE;
return TRUE;
}
NowCan 2002-05-07
  • 打赏
  • 举报
回复
// File: service.h
// The head file of "service.cpp"
// Note: 1. You must use C++ compiler
// 2. The platform is WIN32 (WINNT & WIN95)

#ifndef _SERVICE_H
#define _SERVICE_H

/////////////////////////////////////
////////////// USED FOR WIN95 SERVICE
// Micros
#define RSP_SIMPLE_SERVICE 1
#define RSP_UNREGISTER_SERVICE 0

// Function types for GetProcAddress
#define RegisterServiceProcess_PROFILE (DWORD (__stdcall *) (DWORD, DWORD))

// Service Fuctions in Win95
BOOL W95ServiceRegister(DWORD dwType);
//BOOL W95StartService( DWORD dwType );

#endif

redsuns2001 2002-05-07
  • 打赏
  • 举报
回复
有NT或WIN 2K下可这样使用:
WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int)
{
try
{ Application->Title="";// 加上这句就可让程序从CTRL+ALT+DEL对话框隐藏起来。
Application->Initialize();
Application->CreateForm(__classid(TForm1),&Form1);
Application->Run();
}
......

}

13,870

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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