与新OCX的点网包装DLL兼容性 [英] Dot Net Wrapper DLL Compatability With New OCX

查看:78
本文介绍了与新OCX的点网包装DLL兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了OCX以与VB6中的USB设备通信.然后,我编写了一个使用OCX的Visual Studio 2005 .net应用程序.然后,我对OCX进行了少量更改,并启用了二进制兼容性.新的OCX可以与使用较旧的OCX编译的VB6程序配合使用,而不能与使用较旧的OCX编译的.net程序配合使用.我怀疑问题出在.net为使用Activex组件而创建的包装DLL.我曾经升级过OCX,从未遇到过此问题,尽管一个客户最近报告了这样的问题,但是直到现在我们仍然无法重现他的问题.我相信,使用新的OCX重建.net程序可以解决该问题,但是每次升级OCX时都重建所有.net程序并不现实.

还有其他人遇到这个问题吗,您找到解决方案了吗?

谢谢,
Mike Fryer

I wrote an OCX to communicate with an USB device in VB6. I then wrote a Visual Studio 2005 .net application that used the OCX. Then I made a small change to the OCX, with binary compatibility on. The new OCX works fine with VB6 programs compiled with the older OCX, but not with .net programs compiled with the older OCX. I suspect the problem is with the wrapper DLLs that .net creates for using activex components. I have upgraded OCXs before and never run into this problem, although a customer recently reported a problem like this, but we were not able to recreate his problem until now. I believe that rebuilding the .net program with the new OCX would resolve the problem, but it is not piratical to rebuild all of our .net programs every time we upgrade an OCX.

Has anyone else run into this problem, and did you find a solution?

Thanks,
Mike Fryer

推荐答案

非常实用的方法来重建您拥有源代码的所有内容!如果构建正确完成,则始终可以在完整构建和增量构建之间进行选择.开发中最大的误解之一是不要重建有效的工具".这只是unsafe,并且同时不会节省您的任何开发时间.我知道有人因为这个简单的错误而仅仅失去了部分源代码或支持它的能力.

如果您不同意,对我来说,您似乎还没有完善的版本控制/部署/测试策略.随着经验的积累,您迟早会得出相同的结论,但最好能学习别人的错误,而不是自己一个人.

您需要一键式构建项目,版本控制策略(如您所能承受的那样简单,我最好的建议:所有组件的版本相同(当然,如果可能的话)),版本控制和回归测试.

—SA
It is very practical to rebuild everything you have a source code for! Is your build is done correctly, you always have a possibility to choose between full and incremental build. One of the biggest misconception in development is "don''t re-build what works". This is simply unsafe and, at the same time, don''t save you any development time. I know people who simply lost part of their source code or the ability to support it due to this simple mistake.

If you disagree, to me it would look like you have no sound versioning/deployment/testing strategy yet. As you gain experience, you will get to the same conclusion sooner or later, but better learn on mistakes of someone else, not on your own.

You need to have one-click build project, versioning strategy (as simple as you can afford, my best advice: identical version of all components (if possible, of course)), revision control and regression testing.

—SA


在我看来,所有需要重建的就是一个小项目中的OCX包装器dll.然后构建一个小型安装程序,该程序将注册更改后的OCX并为您的应用程序打补丁.
那是一个可行的选择吗?

欢呼!
In my opinion all that needs to be rebuild is the OCX wrapper dll in a small project. Then build a small installer that will register the changed OCX and patch your applications.
Is that a viable option?

Cheers!


我从2002年的compat文件夹中替换了原来的OCX,并将其替换为2008年的旧版本,它没有任何问题,然后重建了OCX.它可以与我测试过的所有.net应用程序一起使用.我真的不明白为什么,我只是想尽一切办法.如果有人能解释为什么这样做,我想了解一下.

感谢那些尝试提供帮助的人.
I replaced the original OCX, from 2002, in the compat folder with the previous version, 2008, that did not have any problems and then rebuilt the OCX. It worked with all of the .net application I have tested it with. I don''t really understand why, I was just trying anything I could think of. If anyone can explain why this worked, I would like to understand it.

Thanks to those who tried to help.


这篇关于与新OCX的点网包装DLL兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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