让 VB6 ADO 应用程序在 Windows 7 中运行
我继承了几个目前无法在.NET 中重写的旧VB6 应用程序。这些旧的应用程序都使用 ADO,并且在我的 XP 机器上编译良好。自从切换到 Windows 7 计算机以来,应用程序编译得很好,但是当部署它们(在 XP 计算机上)时,我收到错误。这是此 Microsoft 文章讨论的已知问题:
http://support.microsoft.com/kb/2517589< /a>
该文章给出了解决方法的非常详细的解释,其中涉及复制“.TLB”文件并使用“regtlibv12”注册它。当我尝试注册它时,我收到此错误消息:
RegisterTypeLib of C:\Program Files\Common Files\System\ado\msado60_Backcompat.tlb failed : 80029c4a
我也尝试使用旧版本注册它Windows 文件夹中的“regtlib.exe”,但出现此错误:
C:\Program Files\Common 的 LoadTypeLib Files\System\ado\msado60_Backcompat.tlb failed : 80029c4a
因此,我无法继续解决此问题。我将非常感谢任何人能够为我提供有关如何正确注册此文件的任何指导。
先感谢您!
I have inheritted several old VB6 applications that currently cannot be rewritten in .NET. These old applications all use ADO, and compile fine on my XP machine. Since switching to a Windows 7 machine, the applications compile fine, but when they are deployed (on XP machines), I get errors. This is a known issue that this Microsoft article discusses:
http://support.microsoft.com/kb/2517589
The article give a very detailed explanation of a workaround, which involved copying a ".TLB" file and registering it using "regtlibv12". When I attempt to register it, I get this error message:
RegisterTypeLib of C:\Program Files\Common Files\System\ado\msado60_Backcompat.tlb failed : 80029c4a
I have also tried registering this using the old "regtlib.exe" in the Windows folder, but got this error:
LoadTypeLib of C:\Program Files\Common Files\System\ado\msado60_Backcompat.tlb failed : 80029c4a
Because of this, I cannot continue with the work around. I would greatly appreciate any guidance anyone could give me on how to properly register this file.
Thank you in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
将 .TLB 文件放在适当的位置,例如
然后在 VB6 IDE 中打开一个新项目(提升,即以管理员身份)。选择项目|参考...,然后单击浏览按钮。导航到新的 .TLB 文件并将其打开。选中该框以选择该项目并关闭“引用”对话框。
现在应该注册了。
如果绝望,请尝试 VB 类型库注册实用程序。
Put the .TLB file in an appropriate place like
Then open a new Project in the VB6 IDE (elevated, i.e. as admin). Choose Project|References... then click the Browse button. Navigate to the new .TLB file and open it. Check the box to select the item and close the References dialog.
It should be registered now.
If desperate, try VB Type Library Registration Utility.
您可能将该文件下载为
C:\temp\Msado60_Backcompat_i386.tlb
并且未重命名。该示例用于注册C:\temp\Msado60_Backcompat.tlb
(注意,没有_i386
)。使用正确的文件名运行命令。
You probably downloaded the file as
C:\temp\Msado60_Backcompat_i386.tlb
and didn't rename it. The example is for registeringC:\temp\Msado60_Backcompat.tlb
(note, no_i386
).Run the command with the correct filename.
为了根据最新信息更新此答案列表,Microsoft 发布了 KB 2640696,它在更直接的方式。该补丁使您可以更轻松地在构建计算机上进行部署,并解决了下层操作系统问题。
可以在以下位置找到更完整的补丁图片 博客文章。
Just to update this answer list based upon more recent information, Microsoft released KB 2640696 which addresses this issue in a more straightforward manner. This patch makes it much easier to deploy on your build machines and solves the downlevel OS issue as well.
A more complete picture of the patch can be found on the following blog post.