简体   繁体   English

.NET和COM(ActiveX)对象透视图

[英].NET and COM (ActiveX) objects perspective

We are using a software library from a major US manufacturer. 我们使用的是美国主要制造商的软件库。 For years the library had mainly two interfaces, a bunch of C API DLLs and a collection of ActiveX controls which encapsulate the DLL functionality. 多年来,该库主要有两个接口,一堆C API DLL和封装DLL功能的ActiveX控件的集合。 The ActiveX interface worked pretty well back in the old days of Visual Basic 6. Then .NET appeared with it's COM Interop compatibility interface for the now old ActiveX technology. ActiveX界面在Visual Basic 6的早期可以很好地工作。然后.NET与它的COM Interop兼容界面一起出现了,该界面适用于现今的ActiveX技术。 This had a few pitfalls like dynamic objects never removed ( Link ) or problems when using multi-threaded applications (cross apartment calls etc.). 这有一些陷阱,例如永不删除动态对象( Link )或使用多线程应用程序时出现问题(跨单元调用等)。

Now the manufacturer decided to discontinue the ActiveX interface because "of the growing migration from COM (ie, ActiveX control) to .NET technology within the Windows® development community". 现在,制造商决定停止ActiveX界面,因为“是Windows®开发社区中从COM(即ActiveX控件)到.NET技术的日益增长的迁移”。 Can anyone tell me more about that? 谁能告诉我更多有关这件事? Are there plans from Microsoft to drop the COM Interop interface in future .NET releases or are there other huge current and future issues I haven't thought about? Microsoft是否计划在将来的.NET版本中删除COM Interop接口,或者还有其他我尚未考虑的重大当前和未来问题? Or is this more a matter of taste like buying a new TV because it looks better? 还是更像是购买新电视,因为它看起来更好,更像是口味?

Also I'm wondering if there is some kind of ActiveX RAD replacement where from the user side I drag and drop a control to my form, set all parameters graphically and are almost done with that. 我也想知道是否存在某种ActiveX RAD替代品,在该替代品中,我从用户方将控件拖放到窗体上,以图形方式设置所有参数,并且几乎完成了此操作。

Win32 is still heavily based on decisions made in the DOS days, for backward competability. Win32仍然主要基于DOS时代做出的决策,以实现向后竞争。 After investing so much in COM, Microsoft will probably keep that spirit supporting COM interop until .NET dies. 在对COM进行大量投资之后,Microsoft可能会保持支持COM互操作的精神,直到.NET死亡。 Having that said, they will just maintain what they have, without any further development. 话虽如此,他们将继续保持现有状态,而无需任何进一步的开发。

The ActiveX vendor, OTOH, doesn't have that kind of commitment (or at least they don't feel they do). ActiveX供应商OTOH没有这种承诺(或者至少他们不认为自己有这种承诺)。 So regardless of Microsoft's support, they can just drop the ActiveX interface if they like. 因此,不管Microsoft的支持如何,只要愿意,他们都可以删除ActiveX界面。 And they are definitively right saying people hardly ever use COM anymore. 他们绝对正确,说人们几乎不再使用COM。

Nice to see you out from that cave! 很高兴看到您从那个山洞出来! Right now on SO there are 26886 questions tagged C#, 16657 tagged .Net, 12956 tagged ASP.Net and only 700 tagged COM and 243 tagged ActiveX. 现在,SO上有26886个标记为C#的问题,16657个标记为.Net的问题,12956个标记为ASP.Net的问题以及只有700个标记为COM的问题和243个标记为ActiveX的问题。 The witting has been on the wall for many many years. 多年来,这种见证一直在墙上。 The CLR based RAD component technologies had already gone through several incarnations already in the past 7-8 years. 在过去的7-8年中,基于CLR的RAD组件技术已经经历了几代化身。

.NET exceeded the functionality of VB6/ActiveX over six years ago. .NET在六年前超越了VB6 / ActiveX的功能。 Today there's no comparison. 今天没有比较。

It's only surprising that your vendor took this long to decide to drop ActiveX support. 令人惊讶的是,您的供应商花了这么长时间才决定放弃ActiveX支持。

BTW, the drag/drop RAD stuff exceeded ActiveX back when .NET 1.0 first shipped! 顺便说一句,.NET 1.0首次发布时,RAD的拖放功能超出了ActiveX!

Actually, it is a matter of buying a new TV because it has a much healthier LCD screen instead of the old health damaging CRT screen. 实际上,这是购买新电视的问题,因为它具有更健康的LCD屏幕,而不是损坏健康的旧CRT屏幕。 Henceforth, the manufacturer is no longer supporting the old models due to lack of customer interest. 此后,由于缺乏客户兴趣,制造商不再支持旧型号。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM