Difference between COM DLL and ActiveX control

不打扰是莪最后的温柔 提交于 2019-12-05 12:52:35

问题


Few similarities I know..

  • Both cannot execute by themself. It needs some program to instantiate it.

  • COM DLL & ActiveX controls are platform independant. (is it so...?)

  • Both requires to support the interface IUnknown and exposes three methods QueryInterface, AddRef, and Release.

  • It also requires to be registered before using and un-registered after done with it.

But how are they different? Can someone please list it down?

Also my understanding is ActiveX controls are OLE custom controls (OCX). I have heard of terms like ActiveX DLLs. Is it another form of ActiveX control or something different?


回答1:


ActiveX is a flavor of COM. COM+, OLE, and DCOM are also flavors of COM. COM just means Component Object Model. An ActiveX object is just an OLE object that supports IUnknown.

COM is a system-level standard and provides model services to facilitate the construction of higher-level functionality. OLE and ActiveX are high-level services built on top of the COM foundation. COM, ActiveX, and OLE are very similar in nature but ActiveX and OLE provide more application-level features.



来源:https://stackoverflow.com/questions/1763276/difference-between-com-dll-and-activex-control

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!