ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript
IScriptEngine Interface
IScriptEngine Methods
AddCOMObject Method
AddCOMType Method
AddHostObject Method
AddHostType Method
AddHostTypes Method
AddRestrictedHostObject Method
CollectGarbage Method
Evaluate Method
EvaluateDocument Method
Execute Method
ExecuteCommand Method
ExecuteDocument Method
GetStackTrace Method
Interrupt Method
Invoke Method

# IScriptEngine Methods

The IScriptEngine type exposes the following members.

Methods

| Name | Description
--- | --- | ---
| AddCOMObject(String, Guid) | Creates a COM/ActiveX object and exposes it to script code. The registered class is specified by class identifier (CLSID).
| AddCOMObject(String, String) | Creates a COM/ActiveX object and exposes it to script code. The registered class is specified by programmatic identifier (ProgID).
| AddCOMObject(String, HostItemFlags, Guid) | Creates a COM/ActiveX object and exposes it to script code with the specified options. The registered class is specified by class identifier (CLSID).
| AddCOMObject(String, HostItemFlags, String) | Creates a COM/ActiveX object and exposes it to script code with the specified options. The registered class is specified by programmatic identifier (ProgID).
| AddCOMObject(String, Guid, String) | Creates a COM/ActiveX object on the specified server and exposes it to script code. The registered class is specified by class identifier (CLSID).
| AddCOMObject(String, String, String) | Creates a COM/ActiveX object on the specified server and exposes it to script code. The registered class is specified by programmatic identifier (ProgID).
| AddCOMObject(String, HostItemFlags, Guid, String) | Creates a COM/ActiveX object on the specified server and exposes it to script code with the specified options. The registered class is specified by class identifier (CLSID).
| AddCOMObject(String, HostItemFlags, String, String) | Creates a COM/ActiveX object on the specified server and exposes it to script code with the specified options. The registered class is specified by programmatic identifier (ProgID).
| AddCOMType(String, Guid) | Imports a COM/ActiveX type and exposes it to script code. The registered class is specified by class identifier (CLSID).
| AddCOMType(String, String) | Imports a COM/ActiveX type and exposes it to script code. The registered class is specified by programmatic identifier (ProgID).
| AddCOMType(String, HostItemFlags, Guid) | Imports a COM/ActiveX type and exposes it to script code with the specified options. The registered class is specified by class identifier (CLSID).
| AddCOMType(String, HostItemFlags, String) | Imports a COM/ActiveX type and exposes it to script code with the specified options. The registered class is specified by programmatic identifier (ProgID).
| AddCOMType(String, Guid, String) | Imports a COM/ActiveX type from the specified server and exposes it to script code. The registered class is specified by class identifier (CLSID).
| AddCOMType(String, String, String) | Imports a COM/ActiveX type from the specified server and exposes it to script code. The registered class is specified by programmatic identifier (ProgID).
| AddCOMType(String, HostItemFlags, Guid, String) | Imports a COM/ActiveX type from the specified server and exposes it to script code with the specified options. The registered class is specified by class identifier (CLSID).
| AddCOMType(String, HostItemFlags, String, String) | Imports a COM/ActiveX type from the specified server and exposes it to script code with the specified options. The registered class is specified by programmatic identifier (ProgID).
| AddHostObject(String, Object) | Exposes a host object to script code.
| AddHostObject(String, HostItemFlags, Object) | Exposes a host object to script code with the specified options.
| AddHostType(Type) | Exposes a host type to script code with a default name.
| AddHostType(HostItemFlags, Type) | Exposes a host type to script code with a default name and the specified options.
| AddHostType(String, Type) | Exposes a host type to script code.
| AddHostType(String, HostItemFlags, Type) | Exposes a host type to script code with the specified options.
| AddHostType(String, String, Type) | Exposes a host type to script code. The type is specified by name.
| AddHostType(String, HostItemFlags, String, Type) | Exposes a host type to script code with the specified options. The type is specified by name.
| AddHostType(String, String, String, Type) | Exposes a host type to script code. The type is specified by type name and assembly name.
| AddHostType(String, HostItemFlags, String, String, Type) | Exposes a host type to script code with the specified options. The type is specified by type name and assembly name.
| AddHostTypes | Exposes host types to script code.
| AddRestrictedHostObjectT(String, T) | Exposes a host object to script code with the specified type restriction.
| AddRestrictedHostObjectT(String, HostItemFlags, T) | Exposes a host object to script code with the specified type restriction and options.
| CollectGarbage | Performs garbage collection.
| Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable)
| Evaluate(String) | Evaluates script code.
| Evaluate(DocumentInfo, String) | Evaluates script code with the specified document meta-information.
| Evaluate(String, String) | Evaluates script code with an associated document name.
| Evaluate(String, Boolean, String) | Evaluates script code with an associated document name, optionally discarding the document after execution.
| EvaluateDocument(String) | Loads and evaluates a script document.
| EvaluateDocument(String, DocumentCategory) | Loads and evaluates a document with the specified category.
| EvaluateDocument(String, DocumentCategory, DocumentContextCallback) | Loads and evaluates a document with the specified category and context callback.
| Execute(String) | Executes script code.
| Execute(DocumentInfo, String) | Executes script code with the specified document meta-information.
| Execute(String, String) | Executes script code with an associated document name.
| Execute(String, Boolean, String) | Executes script code with an associated document name, optionally discarding the document after execution.
| ExecuteCommand | Executes script code as a command.
| ExecuteDocument(String) | Loads and executes a script document.
| ExecuteDocument(String, DocumentCategory) | Loads and executes a document with the specified category.
| ExecuteDocument(String, DocumentCategory, DocumentContextCallback) | Loads and executes a document with the specified category and context callback.
| GetStackTrace | Gets a string representation of the script call stack.
| Interrupt | Interrupts script execution and causes the script engine to throw an exception.
| Invoke | Invokes a global function or procedure.

Top
See Also

#### Reference

IScriptEngine Interface
Microsoft.ClearScript Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft