进程的查看问题

gandy2004 2001-05-11 08:21:00
在Windows98中按ctr+alt+del可看到当前运行的进程。能否不让别人看到自己所编的正在Windows98运行程序的进程?
...全文
38 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
gandy2004 2001-05-14
  • 打赏
  • 举报
回复
re:简单一招:将窗口的标题去掉。

请问具体的实现在什么?能否给一两个语句?
kovaschi 2001-05-11
  • 打赏
  • 举报
回复
枚举当前进程时所用的一个参数是WNDCLASS 结构中的TITLE,一般的我们将它用szAppName来定义,所以给它赋空就是了!
devouer 2001-05-11
  • 打赏
  • 举报
回复
简单一招:将窗口的标题去掉。
NowCan 2001-05-11
  • 打赏
  • 举报
回复
可以。
// File: service.h
// The head file of "service.cpp"
// Note: 1. You must use C++ compiler
// 2. The platform is WIN32 (WIN9X)

#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

// File: service.cpp --- implement the service
#include <windows.h>

#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"));
if(!hookRegisterServiceProcess)
return FALSE;
// Register the WIN95 service
if(hookRegisterServiceProcess(NULL,dwType)==0)
return FALSE;
return TRUE;
}

15,471

社区成员

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

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