// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Runtime.InteropServices;
usingMicrosoft.ClearScript.Util;
namespaceMicrosoft.ClearScript.Windows
{
/// <summary>
/// Represents an instance of the VBScript engine in a desktop environment.
/// </summary>
/// <remarks>
/// Each Windows Script engine instance in a desktop environment has thread affinity and is
/// bound to a <see cref="System.Windows.Threading.Dispatcher"/> during instantiation.
/// Attempting to execute script code on a different thread results in an exception. Script
/// delegates and event handlers are marshaled synchronously onto the correct thread.
/// </remarks>
[Guid(TypeGuids.VBScriptEngine)]
publicclassVBScriptEngine:WindowsScriptEngine
{
#region constructors
/// <summary>
/// Initializes a new VBScript engine instance.
/// </summary>
publicVBScriptEngine()
:this(null)
{
}
/// <summary>
/// Initializes a new VBScript engine instance with the specified name.
/// </summary>
/// <param name="name">A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
publicVBScriptEngine(stringname)
:this(name,WindowsScriptEngineFlags.None)
{
}
/// <summary>
/// Initializes a new VBScript engine instance with the specified options.
/// </summary>
/// <param name="flags">A value that selects options for the operation.</param>
/// Initializes a new VBScript engine instance with the specified name and options.
/// </summary>
/// <param name="name">A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="flags">A value that selects options for the operation.</param>
/// Initializes a new VBScript engine instance with the specified programmatic
/// identifier, name, list of supported file name extensions, and options.
/// </summary>
/// <param name="progID">The programmatic identifier (ProgID) of the VBScript engine class.</param>
/// <param name="name">A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="fileNameExtensions">A semicolon-delimited list of supported file name extensions.</param>
/// <param name="flags">A value that selects options for the operation.</param>
/// <remarks>
/// The <paramref name="progID"/> argument can be a class identifier (CLSID) in standard
/// GUID format with braces (e.g., "{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}").