我有一个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.
更多推荐
发布评论