what's the difference between an activex control and an activex object?

99封情书 提交于 2019-12-13 17:09:23

问题


"ActiveX controls — small program building blocks — can serve to create distributed applications that work over the Internet through web browsers. Examples include customized applications for gathering data, viewing certain kinds of files, and displaying animation." (wikipedia)

is an Object an instance of a Control?


回答1:


The MS terminology is unclear, especially since ActiveX is more a marketing term than a technical one. Often, "ActiveX" can be replaced with "COM" to give a more technically comprehensible meaning.

All code in ActiveX/COM ultimately is an object that exposes one or more interfaces. So, ActiveX/COM controls are objects, along with other pluggable COM types, such as Explorer Extensions, Browser Helper Objects etc.

For an object to be considered an ActiveX control, it must implement the set of interfaces needed for the control to be embedded in a container. IViewObject, IOleControl, IOleControlSite etc..




回答2:


Nothing in my years of ActiveX development have lead to me believe there is a difference. It's just two ways of saying the same thing.

However, your suggestion of an ActiveX object being an instance of an ActiveX control makes sense. But it strikes me as a level of semantic arguing that does nothing to improve development or communication between developers.



来源:https://stackoverflow.com/questions/3478907/whats-the-difference-between-an-activex-control-and-an-activex-object

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