为什么使用Delphi XE3无法注册64位COM DLL(Why the 64

编程入门 行业动态 更新时间:2024-10-14 08:23:45
为什么使用Delphi XE3无法注册64位COM DLL(Why the 64-bit COM DLL can't be registered using Delphi XE3)

我有一个COM对象,最初是在Delphi 2007,32位下编译的。 现在我已经使用64位编译器移植到Delphi XE3。 它使用新的64位DLL成功编译,但我无法注册它。

我使用Admin来注册DLL,它适用于32位DLL,但不适用于64位。

它一直说'无效访问内存位置'

这里有任何提示吗?

PS:我使用的命令只是%systemroot%\System32\regsvr32.exe test.dll 。

在Windows 7 64位中注册时,它显示“对内存位置的无效访问”; 当在Windows 8 64位中注册时,它显示“动态链接库初始化例程失败”。

I have a COM object, originally compiled under Delphi 2007, 32-bit. Now I have ported to Delphi XE3 using 64-bit compiler. It compiles successfully with a new 64-bit DLL but I just can't get it registered.

I am using the Admin to register the DLL, it works fine for 32-bit DLL but not for 64-bit.

It keeps saying 'Invalid Access to Memory Locations'

Any hints here?

PS: the command i use is simply %systemroot%\System32\regsvr32.exe test.dll.

When registered in Windows 7 64-bit, it shows 'Invalid Access to Memory Locations'; when registered in Windows 8 64-bit, it shows 'A dynamic link library initialisation routine failed'.

最满意答案

是的,我找到了原因。 在其中一个单元的初始化部分,它仍然使用第三方32位浮动操​​作。 删除代码后,它成功注册了DLL。

在win7上,错误消息令人困惑,但在win8上,它说“'动态链接库初始化例程失败',这给出了一个更明确的原因。

Yes, i found the cause. In initialization section of one of the unit, it still uses third party 32-bit floating operations. After I remove the code, it successfully registers the DLL.

On win7, the errormessage is confusing, but on win8, it says "'A dynamic link library initialisation routine failed', which gives a clearer cause.

更多推荐

本文发布于:2023-07-18 04:34:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1154830.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Delphi   DLL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!