本文介绍了是.NET“下面是所有COM”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

多年来,我一直是Juval Lowy在.NET开发领域的教学和指导的仰慕者。他也写了我最喜欢的书之一:编程.NET组件。

I've been an admirer of Juval Lowy's teaching and guidance in .NET development for a number of years. He's also written one of my favorite books: Programming .NET Components.

然而,在最近的DotNet Rocks播客(2010年1月)讨论WCF / COM和.NET时,他做了一些评论,使我非常惊讶:

However on a recent DotNet Rocks podcast (Jan 2010) in discussing WCF/COM and .NET, he made some comments that greatly surprised me:

Carl Franklin:你应该澄清一下
。我的意思是,每个
对象不是一个COM对象。每个
对象具有COM
对象的功能,但.NET Framework
不是COM库。

Carl Franklin: Well, you should clarify that though. I mean, every object is not a COM object. Every object has the capabilities that a COM object does, but the .NET Framework isn't a COM library.

JuvalLöwy:否,不。首先.NET实际上建立在COM的
顶部。

Juval Löwy: No, no. First of all .NET is actually built on top of COM. It's all COM underneath.

然后,在Carl Franklin要求澄清此评论后:

Then, after Carl Franklin asks for clarification on this comment:

JuvalLöwy:当然,所有COM

Juval Löwy: Of course, it all COM underneath.

Carl Franklin:不,我知道这是
交织在一起,是必需的,但是
.NET对象你是
不创建COM对象。

Carl Franklin: No. I know it's intertwined and it's required, but when you new up a .NET object you're not creating a COM object.

JuvalLöwy:您正在创建一个.NET对象,但所有
我说的是.NET被构建
下面。它都是C ++和COM。

Juval Löwy: You're creating a .NET object, but all I'm saying is that .NET is built underneath. It's all C++ and COM.

Carl Franklin:它是C ++,但是您不是
通过
COM接口注册COM对象。这不是所有的东西
除非你特别这样做。

Carl Franklin: It is C++ but you're not registering a COM object through the COM interface. It isn't all that stuff unless you specifically do that.

JuvalLöwy:但是有些东西在下面使用
COM,但是在
点之外。

Juval Löwy: But some of the stuff is using COM underneath, but that's beside the point. Forget about how it's made.


如何阅读这些评论? >虽然我理解(并已经确认)一些系统程序集是用非托管C ++编写的,但是它也是有效的,说它们是所有COM在下面?

While I understand (and have confirmed) that some of the System assemblies are written in unmanaged C++, is it also valid to say that they are "all COM underneath"?

我假设完全可以编写与.NET / ATL / ActiveX完全无关的.NET CLI兼容C ++程序集。

I was under the assumption it is perfectly possible to write .NET CLI compliant C++ assemblies that have absolutely nothing to do with COM / ATL / ActiveX?

这是有关播客的 。参见第7页。

Here is the PDF transcript for the podcast in question. See Page 7.

推荐答案

这几乎就像Löwy故意试图在他说的话不清楚。我没有听播客,但根据乌姆勒斯的评价,我估计英语不是他的第一语言。

It's almost as if Löwy is intentionally attempting to be unclear in what he says. I've not listened to the podcast, but judging by the umlauts, I reckon English is not his first language.

在.NET中使用的一些对象确实是COM对象的包装器。和你创建的.NET对象做了很多COM应该做和更多,没有COM的讨厌的烦恼。我不认为声明它是所有COM下面是准确或清楚。

Some objects that you use in .NET really are wrappers for COM objects. And a .NET object you create does a lot of what COM is supposed to do and more, without COM's nasty annoyances. I don't think the statement "it's all COM underneath" is accurate or clear.

我希望采访过Jeff Richter。 ; - )

I wish the interview had been with Jeff Richter. ;-)

这篇关于是.NET“下面是所有COM”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 16:32