Skip to content

Microsoft.ClearScript.Windows.Core VBScriptEngine - initializing. #347

Answered by ClearScriptLib
inavnapro asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @inavnapro,

Like all Windows Script engines, VBScript has thread affinity, meaning that each instance can only be used on the thread that created it. Any attempt to use the script engine on the wrong thread results in an exception or possibly a crash.

ClearScript provides two managed wrappers for VBScript:

  1. Microsoft.ClearScript.Windows.VBScriptEngine.
  2. Microsoft.ClearScript.Windows.Core.VBScriptEngine.

The first class doesn't require an external implementation of ISyncInvoker. Instead, it provides its own implementation backed by an instance of Dispatcher. This version of VBScriptEngine is intended for desktop or console applications that have a main thread (or one or more UI threads)…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@inavnapro
Comment options

Answer selected by inavnapro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants