System.Diagnostics.Process.Start("regsvr32.exe", "YourDllName.dll");regsvr32.exe 就是调用DllRegisterServer的

解决方案 »

  1.   

    我想知道的是如何跳过regsvr32.exe这个文件来注册,应该可以的吧?
      

  2.   

    可以的
    使用 LoadLibrary Windows API 加载控件 DLL。下一步,使用 GetProcAddress 获得“DllRegisterServer”函数的地址。然后,调用 DllRegisterServer 函数。最后调用FreeLibrary释放Dll.
     安装程序在安装 ActiveX 控件前,应调用 OleInitialize。安装程序完成后,调用 OleUnitialize。这确保 OLE 系统 DLL 在正确的状态中注册 ActiveX 控件。
      

  3.   

    http://www.yesky.com/20000321/35967.shtml
      

  4.   

    System.Diagnostics.Process.Start("regsvr32.exe", "YourDllName.dll");
      

  5.   

    System.Diagnostics.Process.Start("regsvr32.exe /s", "YourDllName.dll");加了/s参数,就不会弹出那个注册成功的对话框