Inconsistent behavior of ScriptControl 64-bit to the msscript.ocx
utopian-io·@justyy·
0.000 HBDInconsistent behavior of ScriptControl 64-bit to the msscript.ocx
The Microsoft provides a 32-bit `msscript.ocx` which allows you to easily do some scripting inside your application, however, they do not have an official 64-bit version of ScriptControl and they are not planning to make one. 64-bit computing and applications are gradually accepted and in an increasing demand recent years. I found [tablacus/TablacusScriptControl](https://github.com/tablacus/TablacusScriptControl) is a very good alternative that provides the 64-bit Scripting Control and I use it quite a lot in my applications. As one can imagine, nowadays, usually the same source code can be compiled to both 32-bit and 64-bit, therefore, we have to make sure the behavior has to stay consistent in either mode. The [behavior is somewhat different](https://helloacm.com/inconsistent-behavior-of-scriptcontrol-64-bit-to-the-msscript-ocx/) between the 64-bit ScriptControl and the Microsoft's 32-bit `msscript.ocx`. # How to reproduce? create two [vbs](https://isvbscriptdead.com/) files, with the 32-bit version: ``` Dim SC Set SC = CreateObject("MSScriptControl.ScriptControl") SC.Reset WScript.Echo SC.Language ``` and 64-bit version: ``` Dim SC Set SC = CreateObject("ScriptControl") SC.Reset WScript.Echo SC.Language ``` If you run both, you will see the 32-bit version throws: ``` ScriptControl (4, 1) : The operation could not be completed because the script engine has not been initialized to a valid language. ``` but the 64-bit ScriptControl silently swallows the error.  <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@justyy/inconsistent-behavior-of-scriptcontrol-64-bit-to-the-msscript-ocx">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>
👍 ivysrono, enjoyy, safran, kangnajiang, geass, justyy, superbing, happyukgo, dailystats, dailyfortune, sv67216721, hammadakhtar, jiangchen, monkeyplayfire, coldhair, awiwea1974, catwomanteresa, fundurian, nada101, ayman101, wangwenjing, tensaix2j, archiles, ericsim, ericsim1991, ericsim1989, moonvoid, oldman28, yuxi, luneknight, shenchensucc, boontjie, frankintaiwan, xuran, ythehuy, susanli3769, iamafra, peipei, utopian-io, tokenteller, ace108, xiaoshancun,