COM与COM之间的区别是什么?自动化? [英] What is difference betqween COM & Automation?

查看:148
本文介绍了COM与COM之间的区别是什么?自动化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对COM与自动化之间的区别感到困惑。

I'm confused of difference between COM and automation.

服务器端和客户端有什么区别?

What's the difference in server and client side?

推荐答案

来自
https://msdn.microsoft.com/en-us/library/windows/desktop/ee663262(v=vs.85).aspx

组件对象模型(COM)

COM是一个独立于平台,分布式,面向对象的系统,用于创建可以交互的二进制软件组件。 COM是Microsoft的OLE(复合文档)和ActiveX(支持Internet的组件)技术的基础技术。

COM is a platform-independent, distributed, object-oriented system for creating binary software components that can interact. COM is the foundation technology for Microsoft's OLE (compound documents) and ActiveX (Internet-enabled components) technologies.

自动化

自动化使软件包能够向脚本工具和其他应用程序公开其独特的功能。自动化使用组件对象模型(COM),但可以独立于其他OLE功能实现,例如就地激活。

Automation enables software packages to expose their unique features to scripting tools and other applications. Automation uses the Component Object Model (COM), but may be implemented independently from other OLE features, such as in-place activation.

此外,请参阅Microsoft的词汇表中的术语描述
https://msdn.microsoft.com/en-us/library/windows/desktop/ms221619(v=vs。 85).aspx

Also, see the descriptions of terms in Microsoft's glossary at https://msdn.microsoft.com/en-us/library/windows/desktop/ms221619(v=vs.85).aspx

必须实例化COM对象才能使用。 想要使用COM对象的代码(例如,接收接口并使用提供的方法和/或属性)是客户端。 客户端要求COM实例化它想要使用
的COM对象。  COM对象由服务器提供。  COM服务器可以是可执行程序(进程外服务器),也可以是加载到客户端进程(进程内服务器)的DLL。 对于进程内服务器, 
COM处理来自客户端的请求,将DLL加载到客户端进程中,调用DLL中的必要方法来实例化COM对象,将请求的接口指针返回到调用客户端然后几乎从。方式 
当客户端想要使用进程外服务器时COM在COM对象实例化期间充当客户端和服务器之间的中间人,并处理两个独立进程(客户端和服务器)之间的调用。当然还有更多
。 :)

A COM object has to be instantiated in order to be used.  The code that want to use a COM object (e.g., receive an interface and use the methods and/or properties provided) is the client.  The client asks COM to instantiate the COM object that it wants to use.  The COM object is provided by a server.  A COM server can be an executable program (out-of-process server) or it can be a DLL that is loaded into the client process (in-process server).  In the case of an in-process server,  COM handles the request from the client, loads the DLL into the client process, calls the necessary methods in the DLL to instaniate the COM object, returns the requested interface pointer to the calling client and then pretty much gets out of the way.  When a client wants to use an out-of-process server COM acts like a middle-man between the client and the server during the COM object instantiation and handling calls between the two separate processes, the client and the server. Of course there's a lot more to it. :)


这篇关于COM与COM之间的区别是什么?自动化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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