确定为什么破坏二进制兼容性 [英] Determining why binary compatibility is broken

查看:79
本文介绍了确定为什么破坏二进制兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试重建我的VB6 DLL之一时,收到警告:

When I try to rebuild one of my VB6 DLLs, I get a warning:

"二进制兼容性DLL或EXE包含参数类型或返回其定义找不到的类型"

"The binary compatibility DLL or EXE contains a parameter type or return type whose definition can not be found"

我必须在选定的DLL中发布一些更改(方法内部的简单更改-根据

I have to release a few changes in selected DLLs (simple changes internal to methods - nothing that breaks the compatibility according to this)

我通常遵循的方法是将旧的DLL维护在单独的共享目录中,并在制作新的DLL时以二进制兼容性设置为旧的DLL进行编译.这样做是为了在我注册新的DLL时不更改GUID.这些GUID用作其他DLL中的引用,在发行期间我没有打扰过.

The generally accepted method which I have followed is to maintain the old DLLs in a separate shared directory and while making the new DLLs, compile them with binary compatibility set to the old set of DLLs. This is done to not change the GUIDs while I register my new DLLs. These GUIDs are used as references in other DLLs which I have not disturbed during the release.

我很确定我没有添加任何东西来破坏二进制兼容性规则(签名,公共方法,变量等均未更改).为什么会发生此错误?

我不是菜鸟吗?从早上开始抓挠我的头.非常感谢您的帮助.

Am I being a noob by not checking something basic? Scratching my head since morning. Any help is much appreciated.

如果我的签名完全没有变化,有没有一种无需比较代码就可以知道的方法?

If at all there are changes to my signature, Is there a way that I can know without comparing code?

推荐答案

获取旧的DLL,并为它们添加 compat _ 前缀.

Take your old DLLs and add a compat_ prefix to them.

基本上将您的 MyAppDataAccess.dll 文件重命名为 compat_MyAppDataAccess.dll .

Basically rename your MyAppDataAccess.dll file to compat_MyAppDataAccess.dll.

现在转到ActiveX DLL的属性,并将您的项目设置为与新的 compat_MyAppDataAccess.dll 具有二进制兼容性,如下所示.

Now go to the properties of your ActiveX DLL and set your project to have binary compatibility with the new compat_MyAppDataAccess.dll, like below.

现在只需构建您的DLL并进行部署.

Now just build your DLL and deploy it.

应该可以.如果实际上您的二​​进制兼容性由于更改而被破坏,那么您将得到警告,指出这一点.

It should work. If, in fact you binary compatibility would be broken as a result of your changes, then you'll get a warning stating that.

这篇关于确定为什么破坏二进制兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆