我使用    
  CreateProcess(pchar('C:\mytest.dll'),pchar('c:\winnt\system32\regsvr32.exe'),  
         nil,nil,True,CREATE_NEW_CONSOLE,NIL,NIL,FstartInfo,FprocessInfo);  
 
  来注册mytest.dll,虽然注册成功,但每次都会弹出成功注册的消息框,请问如何才能不让  
消息框弹出来呢???
  我试着用 CreateProcessAsUser()也不行(因为不太明白这个函数怎么调用),请各位指教.  

解决方案 »

  1.   

    带参数/s,就可以的
    或者自己写代码取代RegSvr32
      

  2.   

    CreateProcess(pchar('/s C:\mytest.dll'),pchar('c:\winnt\system32\regsvr32.exe'),  
             nil,nil,True,CREATE_NEW_CONSOLE,NIL,NIL,FstartInfo,FprocessInfo);
      

  3.   

    use ComObjprocedure RegisterComServer(const DLLName: string);
    DescriptionCOM servers are always registered as dynamic link libraries, DLLs. The DLLName parameter specifies the name of the DLL that implements the COM controls.