javascript/vb“new ActiveXObject()”中使用的对象的技术名称是什么?

发布于 12-20 17:57 字数 364 浏览 6 评论 0原文

您可以在 Windows 的 javascript/vb shell 中创建一些对象,如下所示:

x = new ActiveXObject("name");
x.aMethod();

它们的技术名称是什么(ATL?ActiveX?ActiveX 控件?自动化?或...?

)它们与可以在 IE 中使用的对象不同

<object id="aName" classid="CLSID:1234567-..." codebase="http://somewhere"></object>

There are objects which you can create in Windows' javascript/vb shell like this:

x = new ActiveXObject("name");
x.aMethod();

What is the technical name for them (ATL? ActiveX? ActiveX control? Automation? or...?)

And how are they different from objects that can be used in IE this way:

<object id="aName" classid="CLSID:1234567-..." codebase="http://somewhere"></object>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

深爱成瘾2024-12-27 17:57:21

它们的技术名称是什么(ATL?ActiveX?ActiveX 控件?自动化?或...?)

Internet Explorer 将两者称为ActiveX 控件(请参阅类型列如下图中)

  • ATL(活动模板库)指的是到一个简化 COM 对象(包括 ActiveX 控件)创建的库。
  • 自动化是指构建ActiveX 控件的进程间通信技术。 ActiveX 控件可称为自动化对象

它们与可以在 IE 中以这种方式使用的对象有何不同

通过 JavaScript 实例化的 ActiveX 控件由编程标识符 (ProgID) 引用,并且没有用户界面。作为 标签放置在文档中的控件,通常称为用户控件,由类标识符 (ClassID) 和 < em>可能有用户界面。 标签还继承了 HTML 元素的各种特征。

What is the technical name for them (ATL? ActiveX? ActiveX control? Automation? or...?)

Internet Explorer refers to both as ActiveX controls (see the Type column in the image below)

  • ATL (Active Template Library) refers to a library that simplifies the creation of COM objects, including ActiveX controls.
  • Automation refers to the technology for inter-process communication on which ActiveX controls are built. ActiveX controls may be referred to as Automation objects.

And how are they different from objects that can be used in IE this way

ActiveX controls instantiated through JavaScript are referred to by Programmatic Identifier (ProgID) and have no user interface. Controls placed in the document as <object> tags, commonly referred to as user controls, are specified by Class Identifier (ClassID) and may have a user interface. <object> tags also inherit various traits of HTML elements.

埋葬我深情2024-12-27 17:57:21

来自 MSDN 中 ActiveXObject 函数的文档:

一个为自动化对象提供接口的对象。

自动化对象是一个 COM 对象,其类公开 IDispatch。

ActiveX控件严格来说是为容器设计的。 OLE 接口(如 IOleObject 和 IOleControl)定义了控件与其宿主之间的契约。 ActiveX 可能会也可能不会通过 IDispatch 提供自动化接口。如果 ActiveX 确实提供自动化接口,我们将其称为双接口 ActiveX 或可脚本化 ActiveX,这意味着 ActiveX 可以在后期绑定语言(如 Jscript)中使用。

ATL 是 Visual C++ 中的一个类库。是的,它旨在编写 ActiveX ,但它也可以用于编写 Windows 服务和其他库(例如 MFC)和应用程序。当然,编写ActiveX并不是必须的,在ActiveX发明之前,已经编写了很多ActiveX控件。

还有许多其他组件也与 ActiveX 相关。 ActiveX 文档(例如Adobe Reader、Microsoft Word)是一种可以托管在ActiveX 文档服务器(例如Internet Explorer 框架)中的文档类型。支持ActiveX 的应用程序(例如Microsoft Word、Windows Media Player)在其自己的进程中运行,但可以通过自动化接口实现自动化。

From the documentation of ActiveXObject function in MSDN:

An object that provides an interface to an Automation object.

An automation object is a COM object whose class exposes IDispatch.

ActiveX control, strictly speaking, is designed for a container. The OLE interfaces like IOleObject and IOleControl define the contract between the control and its host. An ActiveX may or may not provide automation interface via IDispatch. If an ActiveX does provide automation interface, we call it a dual Interface ActiveX or scriptable ActiveX, which means the ActiveX can be used in late-binding languages like Jscript.

ATL is a class library in Visual C++. It is designed to writing ActiveX , yes, but it can also be used to write windows services and other libraries (e.g. MFC) and apps. Of course it is not necessary in writing ActiveX, there were many ActiveX controls written before it was invented.

There are many other components that are also associated with ActiveX. ActiveX documents (e.g. Adobe Reader, Microsoft Word) is a type of documents that can be hosted in ActiveX documents servers, such as an Internet Explorer frame. An ActiveX-enabled application (e.g. Microsoft Word, Windows Media Player) runs in its own process but can be automated via automation interface.

梦境2024-12-27 17:57:21

这一系列后期绑定对象通常称为 COM(通用对象模型)对象。松散应用的术语“COM”通常包含任何 OLE、OLE 自动化、ActiveX、COM+ 或 DCOM 对象。本质上,这是通过任意数量的技术提供可编写脚本的(IUnknown)接口的任何对象。

This family of late-bound objects are most often referred to as COM (Common Object Model) Objects. The loosely applied term "COM" typically encompasses any OLE, OLE Automation, ActiveX, COM+, or DCOM object. Essentially, this is any object that provides a scriptable (IUnknown) interface through any number of technologies.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文