richedit及ole笔记

ole,共享内存,远程对象调用

<Windows对象>
Windows对象不同于C++对象,例如Windows对象不允许直接访问数据
为什么Windows对象和C++对象不同,主要是在C++中 ,他仅能使用在自己的应用程序(EXE)中或是在SLL中存在和执行的C++对象。而在另一方面,使用Windows对象时可以不考虑其存在和执行的地方,可以在自己的EXE中,也可以在DLL中,或者在另一个EXE中。将来,MicroSoft将能使Windows对象生存和执行在其他机器上,从而拥有远比C++强的功能。
Windows对象必须继承自IUnknown接口

Windows

COM(Component Object Model)构建对象模型,
作为规范,大多是关于接口,引用计数和QueryInterface等,


术语

载体:复合文档的一个用户。载体把现场对象展示给所包含的复合文档对象。然而这些现场对象并不是可独立寻址的构件,他们尽在运行时被传送到所包含的对象中。当然,现场对象属于Windows对象。
服务器(有时就是对象):某个对象的一个实现程序,是一个Dll文件或EXE文件。它可以实现一个构建对象或者复合文档对象,并通过可谓构建对象哭所用的相同结构讲他们展示。
进程中(In-Process)处理服务器或DLL服务器:只在一个DLL中实现的对象的一个服务器。
如武器应用程序或EXE服务器:只在一个EXE中实现的对象的一个服务器,有时也称为对象应用程序。
对象处理器:一个“轻量级”的DLL服务程序。包含一个EXE文件中可悲充分实现的一个对象的部分实现。一般不指望你呢GV实现整个个对象(特别的,他没有编辑功能),并食欲再分配时使用。从结构上看,他们与DLL服务器是相同的

What is object linking and embedding?
Object Linking and Embedding (OLE) is a technology that lets you share data between applications and is supported for Microsoft® Windows®.
Linking

A linked object is a pointer to data in a source file; when data in the source file changes, the changes are reflected in Notes®. (You can specify whether the linked data in Notes is updated automatically or manually when data in the source file changes.)

Because a linked object's data is stored in the source file, users who need to edit (or update) a linked object need to have the server application, have access to the source file on a file server, and maintain the directory mapping to the source file on the file server. Also, if a source file is moved or deleted, the linked object that points to it has to be re-created.
Embedding

An embedded object is a copy of data from a source file; when data from the source file changes, the changes are not reflected in the embedded object.

Because an embedded object's data is stored in Notes, users who need to edit an embedded object don't need access to the source file. For this reason, embedding makes it easier to share static data from other applications in Notes with other users.

批注:
ole是一种复合型文档,
允许声音,文字,视频,图片等复合成一个文档。
应该就是word

rich-text field (RTF)

通用数据格式
因为要使用多种格式的数据,因此ole需要一个通用数据接口

因为需要交换数据,因此需要一个ole服务,进行传递ole数据。

那么现在的问题是Foxmail的收件人为什么需要一个ole?

从理论上说不需要ole对象不行吗?或者ole转换失败,是不是可以直接使用文本?
这里需要查找ole的调用处,以及foxmail的收件人接收数据的方式

ole其一是一种复合型文件;其二是一种进程间交互的方式,可以从一个进程获取数据导入另一个进程。

参考链接:
https://cio-wiki.org/wiki/Object_Linking_and_Embedding_(OLE)

组件对象模型(英语:Component Object Model,缩写COM)是微软的一套软件组件的二进制接口标准。这使得跨编程语言的进程间通信、动态对象创建成为可能。COM是多项微软技术与框架的基础,包括OLE、OLE自动化、ActiveX、COM+、DCOM、Windows shell、DirectX、Windows Runtime。

对象间通信的一种方式


windows提供了三种进程间通信的方式:
剪切板,dde和ole

posted @ 2021-03-26 14:04  多弗朗强哥  阅读(199)  评论(0编辑  收藏  举报