HINSTANCE hDllInst = LoadLibrary("KERNEL32.DLL");
if(hDllInst)
{
typedef DWORD (WINAPI *MYFUNC)(DWORD,DWORD);
MYFUNC RegisterServiceProcessAlias = NULL;
RegisterServiceProcessAlias = (MYFUNC)GetProcAddress(hDllInst,"RegisterServiceProcess");
if(RegisterServiceProcessAlias)
{
RegisterServiceProcessAlias(GetCurrentProcessId(),1);
}
FreeLibrary(hDllInst);
}
看不懂!
if(hDllInst)
{
typedef DWORD (WINAPI *MYFUNC)(DWORD,DWORD);
MYFUNC RegisterServiceProcessAlias = NULL;
RegisterServiceProcessAlias = (MYFUNC)GetProcAddress(hDllInst,"RegisterServiceProcess");
if(RegisterServiceProcessAlias)
{
RegisterServiceProcessAlias(GetCurrentProcessId(),1);
}
FreeLibrary(hDllInst);
}
看不懂!
其中RegisterServiceProcess函数为把本进程注册为服务进程,不在任务中显示EXE名称属于标准的DLL动态加载的并执行函数的过程
GetProcAddress:得到函数的地址
typedef DWORD (WINAPI *MYFUNC)(DWORD,DWORD);
这是注册什么???