且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是什么取代了.Net中的OLE 2.0?

更新时间:2023-01-13 23:36:48

如果你想继续与MS office和com接口互操作

他们使用你必须实现那些COM接口,如果你想要在你自己的应用程序集中工作,你可以通过编写自己的应用程序来实现。如果你正在寻找一个标准我很害怕你运气不好(无论如何都是AFAIK)。

希望MS能够在漫长的时间范围内提供标准的解决方案,如果

不是我会说用户社区开发这样的东西。


" Avi Nahir" < AV ** @ bezeqint.net>在消息中写道

news:fb ************************** @ posting.google.c om ...
大家好,

我正在开发一个C#.Net Windows Forms应用程序,我正在尝试
主持 mshtml。

观察ItWriting控件
http://www.itwriting.com/htmleditor/index.php),我看到它实现了OLE2接口来托管mshtml控件。 Mshtml被编写为通过OLE使用,所以就是这样:如果你试图主持一个控件
你需要模拟控件编写的环境。

然而,我有一个哲学的 (或设计)问题:为了这个帖子的缘故,我不是按时间顺序区分COM和OLE,而是采用网络层比喻:

(*)COM是低级别,IUnknown,类工厂,VTable,IDispatch,
等。(*)OLE是几个特定COM接口的_ COLLECTION_,由MS命令成为应用程序之间的粘合剂一个应用程序的文档托管在另一个应用程序中:合并菜单和激活容器内托管的文档。

所以,_today_,什么是集成之间的方式应用程序?如果我今天写了Word.Net,并希望它能够作为Outlook.Net的消息编辑组件,并希望能够嵌入一个
Excel.Net电子表格在我的邮件消息中,我还会实现那些特定的COM接口吗?怎么样? .Net会透明地为我做这件事吗?

问候,

Avi



Avi,

假设的Word.Net,Excel.Net& Outlook.Net不依赖于

COM可能基于.NET Remoting。由于Remoting可以让你在AppDomains中使用一个对象,然后更紧密地耦合到Web

服务。


但是!正如丹尼尔指出的那样,我不知道当前(甚至计划好的)

OLE.NET这将允许Excel.Net在Outlook.Net中嵌入电子表格

或Word.Net" document。


顺便说一句:你是对的,今天,.NET使用COM互操作来使用现有的COM

接口。


希望这有帮助

Jay


" Avi Nahir" < AV ** @ bezeqint.net>在消息中写道

news:fb ************************** @ posting.google.c om ...
大家好,

我正在开发一个C#.Net Windows Forms应用程序,我正在尝试
主持 mshtml。

观察ItWriting控件
http://www.itwriting.com/htmleditor/index.php),我看到它实现了OLE2接口来托管mshtml控件。 Mshtml被编写为通过OLE使用,所以就是这样:如果你试图主持一个控件
你需要模拟控件编写的环境。

然而,我有一个哲学的 (或设计)问题:为了这个帖子的缘故,我不是按时间顺序区分COM和OLE,而是采用网络层比喻:

(*)COM是低级别,IUnknown,类工厂,VTable,IDispatch,
等。(*)OLE是几个特定COM接口的_ COLLECTION_,由MS命令成为应用程序之间的粘合剂一个应用程序的文档托管在另一个应用程序中:合并菜单和激活容器内托管的文档。

所以,_today_,什么是集成之间的方式应用程序?如果我今天写了Word.Net,并希望它能够作为Outlook.Net的消息编辑组件,并希望能够嵌入一个
Excel.Net电子表格在我的邮件消息中,我还会实现那些特定的COM接口吗?怎么样? .Net会透明地为我做这件事吗?

问候,

Avi





Jay B. Harlow [MVP - Outlook]" < JA ************ @ msn.com>写在消息

新闻:呃************** @ TK2MSFTNGP09.phx.gbl ...
Avi,>假设的Word.Net,Excel.Net&不依赖于COM的Outlook.Net可能基于.NET Remoting。由于远程处理能够使您在AppDomains中使用对象,因此与Web服务更紧密地结合在一起。
实际上,虽然远程处理可以用于自动化,但是对于托管你仍然需要一系列接口来完成添加工具栏的工作,菜单

条目等(理想情况下,接口可以使用MarshalByRef对象上的实现

进行远程处理)。至少在.NET版本中它会是一个更简单的问题,可能只是一个或两个接口,而不是那些......你需要实现的
OLE?(我从来没有这样做,考虑过它,但是它太多了很多工作来自.NET)。这肯定是我想要设计的东西,我不会很快就会发生很多希望。

但是你开始考虑定位服务,以及其他什么,COM可能

仍然在自动化方面占据上风,其不幸但是目前远程打算只是不能完成任务,我'我希望indigo会帮助




老实说,我不确定办公室使用的自动化程度是否可行

在当前的.NET基础架构中。
但是!正如丹尼尔指出的那样,我不知道当前(甚至计划)的OLE.NET。这将允许Excel.Net在Outlook.Net
或Word.Net文档中嵌入电子表格。

BTW:你是对的,今天,.NET使用COM互操作来使用现有的COM
接口。

希望这有帮助
Jay

Avi Nahir < AV ** @ bezeqint.net>在消息中写道
新闻:fb ************************** @ posting.google.c om ...
大家好,

我正在开发一个C#.Net Windows Forms应用程序,我正在尝试
主持 mshtml。

观察ItWriting控件
http://www.itwriting.com/htmleditor/index.php),我看到它实现了OLE2接口来托管mshtml控件。 Mshtml被编写为通过OLE使用,所以就是这样:如果你试图主持一个控件
你需要模拟控件编写的环境。

然而,我有一个哲学的 (或设计)问题:为了这个帖子的缘故,我不是按时间顺序区分COM和OLE,而是采用网络层比喻:

(*)COM是低级别,IUnknown,类工厂,VTable,IDispatch,
等。(*)OLE是几个特定COM接口的_ COLLECTION_,由MS命令成为应用程序之间的粘合剂一个应用程序的文档托管在另一个应用程序中:合并菜单和激活容器内托管的文档。

所以,_today_,什么是集成之间的方式应用程序?如果我今天写了Word.Net,并希望它能够作为Outlook.Net的消息编辑组件,并希望能够嵌入一个
Excel.Net电子表格在我的邮件消息中,我还会实现那些特定的COM接口吗?怎么样? .Net会透明地为我做这件事吗?

问候,

Avi




Hi all,

I''m developing a C# .Net Windows Forms application, and am trying to
"host" mshtml.

Observing ItWriting control
(http://www.itwriting.com/htmleditor/index.php), I saw it implements
OLE2 interfaces to host the mshtml control. Mshtml was written to be
used through OLE, so that''s it: If you''re trying to ''host'' a control
you need to emulate the environment for which the control was written.

However, I have a "philosophical" (or design) question: For the sake
of this posting, I differentiate between COM and OLE not
chronologically but by taking the network layers metaphor:

(*) COM is low level, IUnknown, class factories, VTable, IDispatch,
etc.
(*) OLE is a _ COLLECTION_ of several specific COM interfaces,
decreed by MS to be the glue between applications where a document of
one application is hosted within another: merging of menus and
activation of a document hosted within a container.

So,_today_, what is the way to integrate between applications? If I
wrote Word.Net today, and wanted it to be able to serve as the message
editing component of Outlook.Net, and wanted to be able to embed an
Excel.Net spreadsheet within my mail message, would I still implement
those specific COM interfaces? How? Would .Net do it for me
transparently?

Regards,

Avi

If you want to continue interoperating with MS office and the com interfaces
they use you will have to implement those COM interfaces, if you want to
work within your own application set you can do that by writing your own. If
you are looking for a standard I''m afraid you are out of luck(AFAIK anyway).
Hopefully MS will provide a standard solution in the longhorn timeframe, if
not I would say its up to the user community to develop such a thing.

"Avi Nahir" <av**@bezeqint.net> wrote in message
news:fb**************************@posting.google.c om...
Hi all,

I''m developing a C# .Net Windows Forms application, and am trying to
"host" mshtml.

Observing ItWriting control
(http://www.itwriting.com/htmleditor/index.php), I saw it implements
OLE2 interfaces to host the mshtml control. Mshtml was written to be
used through OLE, so that''s it: If you''re trying to ''host'' a control
you need to emulate the environment for which the control was written.

However, I have a "philosophical" (or design) question: For the sake
of this posting, I differentiate between COM and OLE not
chronologically but by taking the network layers metaphor:

(*) COM is low level, IUnknown, class factories, VTable, IDispatch,
etc.
(*) OLE is a _ COLLECTION_ of several specific COM interfaces,
decreed by MS to be the glue between applications where a document of
one application is hosted within another: merging of menus and
activation of a document hosted within a container.

So,_today_, what is the way to integrate between applications? If I
wrote Word.Net today, and wanted it to be able to serve as the message
editing component of Outlook.Net, and wanted to be able to embed an
Excel.Net spreadsheet within my mail message, would I still implement
those specific COM interfaces? How? Would .Net do it for me
transparently?

Regards,

Avi



Avi,
A hypothetical Word.Net, Excel.Net & Outlook.Net that are NOT dependent on
COM would probably be based on .NET Remoting. As Remoting is what enables
you to use an object across AppDomains, more closely coupled then Web
Services.

However! As Daniel pointed out I don''t know of a current (or even planned)
"OLE.NET" that would allow Excel.Net to embed a spreadsheet in Outlook.Net
or Word.Net "document".

BTW: You are correct, today, .NET uses COM interop to use the existing COM
interfaces.

Hope this helps
Jay

"Avi Nahir" <av**@bezeqint.net> wrote in message
news:fb**************************@posting.google.c om...
Hi all,

I''m developing a C# .Net Windows Forms application, and am trying to
"host" mshtml.

Observing ItWriting control
(http://www.itwriting.com/htmleditor/index.php), I saw it implements
OLE2 interfaces to host the mshtml control. Mshtml was written to be
used through OLE, so that''s it: If you''re trying to ''host'' a control
you need to emulate the environment for which the control was written.

However, I have a "philosophical" (or design) question: For the sake
of this posting, I differentiate between COM and OLE not
chronologically but by taking the network layers metaphor:

(*) COM is low level, IUnknown, class factories, VTable, IDispatch,
etc.
(*) OLE is a _ COLLECTION_ of several specific COM interfaces,
decreed by MS to be the glue between applications where a document of
one application is hosted within another: merging of menus and
activation of a document hosted within a container.

So,_today_, what is the way to integrate between applications? If I
wrote Word.Net today, and wanted it to be able to serve as the message
editing component of Outlook.Net, and wanted to be able to embed an
Excel.Net spreadsheet within my mail message, would I still implement
those specific COM interfaces? How? Would .Net do it for me
transparently?

Regards,

Avi




"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:uh**************@TK2MSFTNGP09.phx.gbl...
Avi,
A hypothetical Word.Net, Excel.Net & Outlook.Net that are NOT dependent on
COM would probably be based on .NET Remoting. As Remoting is what enables
you to use an object across AppDomains, more closely coupled then Web
Services. Actually, while remoting would serve for automation, for hosting you''d still
need a series of interfaces that would do the work of adding toolbars, menu
entries, etc(Ideally the interfaces would be remotable using implementations
on a MarshalByRef object). Atleast in the .NET strata it would be a simpler
issue, probably just one or two interfaces instead of the what...7 or so you
have to implement for OLE?(I''ve never done it, considered it but its too
much work from .NET). It certainly is something I''d like to see designed, I
just don''t have many hopes of it happening anytime soon.
But then you start considering locating services, and whatnot, COM probably
still has the upper hand in automation as well, its unfortunate but
currently remoting just isn''t up to the task, I''m hoping indigo will help
with that.

I honestly am not sure automation on the level Office uses is even possible
in the current .NET infrastructure.
However! As Daniel pointed out I don''t know of a current (or even planned)
"OLE.NET" that would allow Excel.Net to embed a spreadsheet in Outlook.Net
or Word.Net "document".

BTW: You are correct, today, .NET uses COM interop to use the existing COM
interfaces.

Hope this helps
Jay

"Avi Nahir" <av**@bezeqint.net> wrote in message
news:fb**************************@posting.google.c om...
Hi all,

I''m developing a C# .Net Windows Forms application, and am trying to
"host" mshtml.

Observing ItWriting control
(http://www.itwriting.com/htmleditor/index.php), I saw it implements
OLE2 interfaces to host the mshtml control. Mshtml was written to be
used through OLE, so that''s it: If you''re trying to ''host'' a control
you need to emulate the environment for which the control was written.

However, I have a "philosophical" (or design) question: For the sake
of this posting, I differentiate between COM and OLE not
chronologically but by taking the network layers metaphor:

(*) COM is low level, IUnknown, class factories, VTable, IDispatch,
etc.
(*) OLE is a _ COLLECTION_ of several specific COM interfaces,
decreed by MS to be the glue between applications where a document of
one application is hosted within another: merging of menus and
activation of a document hosted within a container.

So,_today_, what is the way to integrate between applications? If I
wrote Word.Net today, and wanted it to be able to serve as the message
editing component of Outlook.Net, and wanted to be able to embed an
Excel.Net spreadsheet within my mail message, would I still implement
those specific COM interfaces? How? Would .Net do it for me
transparently?

Regards,

Avi