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); 
}
看不懂!

解决方案 »

  1.   

    动态加载KERNEL32.DLL,取得RegisterServiceProcess函数指针,并执行
    其中RegisterServiceProcess函数为把本进程注册为服务进程,不在任务中显示EXE名称属于标准的DLL动态加载的并执行函数的过程
      

  2.   

    就一个目的,调用.dll中的这个函数:RegisterServiceProcess().
      

  3.   

    调用KERNEL32.DLL中的RegisterServiceProcess函数
      

  4.   

    LoadLibrary:加载动态库
    GetProcAddress:得到函数的地址
      

  5.   

    楼上各位高手,I服了YOU,在问一下
    typedef DWORD (WINAPI *MYFUNC)(DWORD,DWORD);   
    这是注册什么???