Hosting an Active Script
Before you can make your application scriptable, you need to determine the application’s object model. The object model is a specification of the objects that are available to the scripting engine through OLE automation. Internet Explorer, for example, exposes objects that are appropriate to HTML authoring, such as the document, form, window, and browser. In your application, expose objects that are specific to your problem domain.
After you determine the object model for your application, you can begin to implement the application. To host a script, you need to implement the necessary ActiveX scripting COM interfaces: IActiveScriptSite and IActiveScriptSiteWindow. By implementing these interfaces, you expose the properties and methods for each object in your object model and enable manipulation of these objects from VBScript or JavaScript.
Objective Toolkit’s SECAScriptHost class provides a default encapsulation and implementation of these two interfaces. Consequently, you only need to instantiate an SECAScriptHost to implement both COM interfaces.