I
import
Unregistered / Unconfirmed
GUEST, unregistred user!
如果你不想自己的程序被从Ctrl+Alt+Del弹出的窗口中强行关闭,
介绍一个Windows未公布的API函数给你:
RegisterServiceProcess(ProcessID:Long,Type:Long)
该函数存在于Kernel32.dll中.
Process指向进程的ID,Type表示是否向系统注册该进程,是1,否0.
/////////////////////////////////////////////////////////////////////////////
function RegisterServiceProcess(a:longint;const b:longint):dword;stdcall;far;external 'Kernel32.dll' name 'RegisterServiceProcess';
ddd:=GetCurrentProcessId;
if (RegisterServiceProcess(ddd,1)=0) then
showmessage('error!');
////////////////////////////////////////////////////////////////////////////
用未公开函数RegisterServiceProcess
#define RSP_SIMPLE_SERVICE 1
#define RSP_UNREGISTER_SERVICE 0
//下面代码为隐藏
DWORD dwID,redserv;
dwID = GetCurrentProcessId();
regserv = RegisterServiceProcess(pid,RSP_SIMPLE_SERVICE);
//恢复隐藏
dwID= GetCurrentProcessId()
regserv = RegisterServiceProcess(pid,RSP_UNREGISTER_SERVICE);
介绍一个Windows未公布的API函数给你:
RegisterServiceProcess(ProcessID:Long,Type:Long)
该函数存在于Kernel32.dll中.
Process指向进程的ID,Type表示是否向系统注册该进程,是1,否0.
/////////////////////////////////////////////////////////////////////////////
function RegisterServiceProcess(a:longint;const b:longint):dword;stdcall;far;external 'Kernel32.dll' name 'RegisterServiceProcess';
ddd:=GetCurrentProcessId;
if (RegisterServiceProcess(ddd,1)=0) then
showmessage('error!');
////////////////////////////////////////////////////////////////////////////
用未公开函数RegisterServiceProcess
#define RSP_SIMPLE_SERVICE 1
#define RSP_UNREGISTER_SERVICE 0
//下面代码为隐藏
DWORD dwID,redserv;
dwID = GetCurrentProcessId();
regserv = RegisterServiceProcess(pid,RSP_SIMPLE_SERVICE);
//恢复隐藏
dwID= GetCurrentProcessId()
regserv = RegisterServiceProcess(pid,RSP_UNREGISTER_SERVICE);