为什么我的DLL无法注册? [英] Why is my DLL failing to register?
问题描述
项目:错误PRJ0019:工具从注册ActiveX控件返回错误代码。 ..
这是很模糊的。当我通过命令行手动注册DLL(使用 regsv32.exe
,我收到以下错误:
LoadLibrary(test.ocx)失败 - 此应用程序由于应用程序配置不正确而无法启动。重新安装应用程序可能会解决问题。
我在凶恶的.ocx文件上运行了Dependency Walker( depends.exe
),但没有显示任何明显的问题。 / p>
我也做了一个重新构建,但我仍然遇到同样的问题。
任何建议微软最近发布了一个ATL安全更新程序(KB971090),以及如何确定此失败的原因注册?
它是在MSVS2005sp1之上的更新,它是编译时间和运行时间兼容性破坏器。检查你的建筑环境是否有这个补丁。
参考文献:
- ATL安全更新:
http ://msdn.microsoft.com/en-us/visualc/ee309358.aspx - ATL中的突破变化:
http://msdn.microsoft.com/de-de/library/ms235654.aspx - 这是一个必读:
http://tedwvc.wordpress.com/2009/08/10/avoiding-problems-with-vc2005-sp1-security-update -kb971090 /
I am building a project in VS2005 and several of my DLLs are failing to register. The error message I am getting in Visual Studio is:
Project : error PRJ0019: A tool returned an error code from "Registering ActiveX Control..."
which is nicely vague. When I register the DLL manually through the command line (using regsv32.exe
, I get the following error:
LoadLibrary("test.ocx") failed - This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem.
I ran Dependency Walker (depends.exe
) on the culprit .ocx file but it isn't showing any obvious problems.
I have also done a re-build but I'm still getting the same problem.
Any suggestions as to how I could determine the cause of this failure to register?
Microsoft had recently released a Security Update for ATL (KB971090). It is un update on top of MSVS2005sp1 and it's both compilate-time and runtime compatibility breaker. Check if your building environment has this patch.
References:
- ATL Security Update: http://msdn.microsoft.com/en-us/visualc/ee309358.aspx
- Breaking changes in ATL: http://msdn.microsoft.com/de-de/library/ms235654.aspx
- And this is a must read: http://tedwvc.wordpress.com/2009/08/10/avoiding-problems-with-vc2005-sp1-security-update-kb971090/
这篇关于为什么我的DLL无法注册?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!