Regsvr 32命令是Windows中控件文件(如扩展名为DLL、OCX、CPL的文件)的注册和反注册工具。   命令格式 
  Regsvr32 [/s] [/n] [/i[:cmdline]] dllname   /u 卸载安装的控件,卸载服务器注册;   /s 注册成功后不显示操作成功信息框;   /i 调用DllInstall函数并把可选参数[cmdline]传给它,当使用/u时用来卸载DLL;   /n 不调用DllRegisterServer,该参数必须和/i一起使用。 /u 和 /s 就不必说了,说说/i和/n,这个DllInstall函数是由谁来提供的?是.dll提供的吗?
可选参数[cmdline]具体是什么?
  /n 不调用DllRegisterServer,产生什么效果?
  说得越详细得分越多哦!^_^

解决方案 »

  1.   

    DllInstall
    Handles installation and setup for a DLL. HRESULT DllInstall(
    BOOL bInstall,
    LPCWSTR pszCmdLine
    );Parameters
    bInstall 
    Value that is set to TRUE if the DLL is being installed, or FALSE if it is being uninstalled. 
    pszCmdLine 
    String passed in by regsvr32 that indicates which setup procedure to use. 
    Return Values
    Returns NOERROR if successful, or an OLE-defined error value otherwise. Res
    This function may be implemented and exported by name by a DLL for use during application installation or setup. It is invoked by regsvr32 to allow the DLL to perform tasks such adding information to the registry.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. To use DllInstall with regsvr32, add a "/i" flag followed by a colon (:) and a string. The string will be passed to the DllInstall as the pszCmdLine parameter. If you omit the colon and string, pszCmdLine will be set to NULL. The following example would be used to install a DLL: regsvr32 /i:"Install_1" dllname.dll
    DllInstall is invoked with bInstall set to TRUE and pszCmdLine set to "Install_1". To uninstall a DLL, use: regsvr32 /u /i:"Install_1" dllname.dll
    With both of the above examples, DllRegisterServer or DllUnregisterServer will also be called. To call DllInstall only, add a "/n" flag: regsvr32 /n /i:"Install_1" dllname.dll
      

  2.   

    参考上面的MSDN说明,DllInstall是由DLL提供的,用途与DllRegisterServer类似,与DllRegisterServer不同的是,DllInstall函数可以接受参数,并根据参数执行不同的操作。
      

  3.   

    用过dir命令么?知道这俩的区别吧:
    dir *.*
    dir *.exe/u等参数就类似 *.*、*.exe 的作用,不知说清楚没有 ^_^