我们有个系统原来用delphi7开发的一个DLL,可以注册成COM+组件,用作中间件。在XP\2000\2003下都可以正常注册使用。现在2008、Win7比较多,这个DLL无法注册,只好在WIN7\2008系统中安装一个VMWare虚拟机,在虚拟机中安装2003来注册这个DLL当中间件用,非常麻烦。有没有哪位高人帮我分析一下是什么原因,需要怎么处理,代码可以供测试使用,如果可以解决,费用面谈,谢谢!Windows 7DLL 无法注册

解决方案 »

  1.   

    尝试关闭UAC,并使用管理员身份注册COM
      

  2.   

    如果不关闭UAC就给添加个白名单
    http://bbs.csdn.net/topics/330194510另外,代码中,申请权限时只申请用到的权限,而不要申请全部权限
      

  3.   

    楼上兄台,UAC已经关闭了,但还是不行;regsvr32 我的文件.dll 时没有任何提示,到COM+中加载组件时,已注册的组件中没有这个DLL,所以应该是没有注册成功。COM+新增组件时有两程,一种是导入已注册的组件,一种是安装新组件,即手工指定“我的文件.dll
      

  4.   

    可以试试帖子中讨论到的方法,制作成MSI安装包应该最简单。
    http://bbs.csdn.net/topics/370266767
      

  5.   

    会不会是我代码的原因呢?在win7下面的dll注册与xp\2000\2003下的注册不一样?哪位大神可以帮帮我吧!
      

  6.   

    用管理员身份,启动一个CMD.exe
    再注册一下试试
      

  7.   

    Registration-Free COM Terminology
    Anyone familiar with .NET Framework technology will be accustomed to the term assembly, which denotes a set of one or more modules deployed, named, and versioned as a unit, with one module containing a manifest that defines the set. In Registration-free COM, the terms assembly and manifest are borrowed for ideas that are similar in concept but not identical to their .NET counterparts.
    Registration-free COM uses assembly to mean a set of one or more PE modules (i.e., either native or managed) deployed, named, and versioned as a unit. Registration-free COM uses manifest to refer to text files with the .manifest extension containing XML, which either defines the identity of an assembly (assembly manifest), together with the binding and activation details of its classes, or defines the identity of an application (application manifest), together with one or more assembly identity references. An assembly manifest file is named for the assembly, and an application manifest file is named for the application.
    The term side-by-side (SxS) assemblies refers to the configuration of different versions of the same COM component, via manifest files, in order that they can be loaded simultaneously by different threads without needing to be registered. SxS enables, and is loosely synonymous with, registration-free COM.
    -----------------------------------------
    总之,就是改你的manifest文件