Inconsistent behavior of ScriptControl 64-bit to the msscript.ocxsteemCreated with Sketch.

in #utopian-io9 years ago (edited)

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 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 between the 64-bit ScriptControl and the Microsoft's 32-bit msscript.ocx.

How to reproduce?

create two vbs 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.

image.png



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Thank you so so much!

Hey @justyy I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.089
BTC 61651.19
ETH 1725.67
USDT 1.00
SBD 0.38