既然com的dll是在安装的时候Register的,那么为什么要弄两个函数出来?Install函数是每次启动com组件都会调用的吗? 还是安装注册的时候调用的? 如果是注册的时候(regsrv)的时候调用的,那么和DllRegister岂不是重复了?

解决方案 »

  1.   

    DllInstall is used only for application installation and setup. It should not be called by an application. It is similar in purpose to DllRegisterServer or DllUnregisterServer. Unlike these functions, DllInstall takes an input string which can be used to specify a variety of different actions. This allows a DLL to be installed in more than one way, based on any criteria that is appropriate. 
      

  2.   


    你的意思是不是说,DllInstall的功能应该涵盖DllRegister里实现的内容?regsvr32注册一个com组件的时候,调用的是DllRegister吧? 那么什么时候DllInstall函数会被外部调用呢? regsvr32的不同参数?
      

  3.   

    意思是说DllInstall的可以带命令行参数进行注册