The illustration below shows the interaction between an ActiveX Scripting host and an ActiveX scripting engine.
The following list annotates the steps involved in the handshake (the actual nesting of the calls has been omitted for clarity):
The following terms are used to refer to entities in the above diagram:
Host | The application or program that owns the ActiveX Scripting engine. The host implements IActiveScriptSite and optionally IActiveScriptSiteWindow. |
Scripting Engine | The OLE object that implements IActiveScript and optionally IActiveScriptParse. |
Script | The data that makes up the "program" that the scripting engine runs. The script gets loaded into the scripting engine via IPersist* or IActiveScriptParse. |
Scriptlet | A portion of a script that gets attached to an object via IActiveScriptParse. The aggregate collection of scriptlets is the script. |
Script Language | The language (for example, VBScript) and the semantics thereof. |
Named Item | COM object (OLE Automation support is preferable) that the host deems interesting to the script. Examples include the HTML Page and Browser in a Web Browser, and the Document and Dialogs in Microsoft Word. |
Code Object | An instance created by the scripting engine that is associated with a named item, such as the module behind a Form in Visual Basic, or a C++ class associated with a named item. Preferably, this code object is an OLE COM object supporting OLE Automation so that the code object can be manipulated by the host or another nonscript entity. |