The Channel Refresh Cycle
To begin the refresh cycle, a programmer invokes the Refresh method on a class IChannel dispinterface. When this occurs, the object first checks its RefreshType property for the name of the agent to run. One of the following occurs in each case:
-
If the RefreshType property is set to "manual" or "none", no agent is defined, so the cycle ends. This is the default for newly created Channel objects
-
If the RefreshType property is set to "userscript" or "custom", the object attempts to run the agent defined in the RefreshScript property.
-
For any other value, the object checks in the registry for a key that matches the name of the agent. From there it can determine the agent to run.
If the object determines that it has an agent specified, it begins the refresh cycle. The process is outlined as follows.
-
The Channel object creates an Active Scripting Host.
-
The object loads the appropriate agent script.
-
For a script specified as "userscript", it loads the VBScript Active Scripting engine, For others, it checks the registry under the name of the agent for a value listed under the named value "Script Language". This determines the scripting language and thus the engine to load.
-
The object passes its own IChannel dispinterface, the dispinterface contained by the RefreshOptions collection, the associated IProject dispinterface, and the util dispinterface to the scripting host. These become built-in interfaces (or objects) in the agent's namespace. They can be referred to by the names "channel","options","project", and "util" respectively.
-
The engine is sent the agent script for parsing and execution.
© 1997-1998 Microsoft Corporation. All rights reserved.