64-bit VBS_ Functions

Started by JoeC4281, October 13, 2023, 09:32:33 AM

Previous topic - Next topic

JoeC4281

I see by the help file;
QuoteThe BCX VBS scripting procedures are 32 bit only. The Microsoft msscript component was not ported to 64 bit.

Note well that there is a 64-bit drop-in replacement for the Microsoft msscript component.

https://github.com/tablacus/TablacusScriptControl

The C Source code for the TablacusScriptControl was built with Visual C++ 2010 Express Edition SP1

Other than Microsoft's dislike of VBScript,
can the BCX VBS scripting procedures be adapted to work with this 64-bit drop-in replacement?

Joe

JoeC4281

...and/or...

Since the C source code for VBScript is available (for Wine),
incorporate VBScript in BCX for programs that use the VBS_ functions.

Ref: https://github.com/alexhenrie/wine/tree/master/dlls/vbscript

Joe

MrBcx

#2
Hi Joe,

I downloaded it in 2019 but put it on the shelf, as I was ( and still am ) keeping busy
with things that are more useful to me.  This was the 2019 readme:


Script Control for 64-bit platforms

Tablacus Script Control 64

Alternate MSScript.ocx

* Install & Uninstall

Run setup.exe

or

* Install

Run as administrator
regsvr32 tsc64.dll

* Uninstall

Run as administrator
regsvr32 /u tsc64.dll

https://tablacus.github.io/scriptcontrol_en.html


The first thing I would try, if I were YOU, is to install it and compile a simple script.

BED makes targeting 64-bit dead simple.

Being a COM interface, purporting to be a drop-in replacement, your 64-bit sample -should- just run.

The following (slightly updated) example from the BCX Help file still compiles and runs
in 32-bit mode using MSVC, Pelles, Mingw, and Lcc-Win32



CLS
VBS_START

VBS_ADDCODE("Dim Mystring, Mydouble")
VBS_ADDCODE("Dim I: For I = 65 To 65 + 25: Mystring=Mystring + Chr(I): Next")
VBS_ADDCODE("Mydouble = ATN(1.0) * 4.0")

COLOR 11, 0

PRINT VBS_EVAL_NUM("Mydouble")  ' displays 3.14159265358979
PRINT VBS_EVAL_STR$("Mystring") ' displays ABCDEFGHIJKLMNOPQRSTUVWXYZ

VBS_RESET
VBS_RUN_SCRIPT("Msgbox " & ENC$("BCX Called VBSCRIPT MsgBox Function"))
VBS_STOP

COLOR 7, 0
PAUSE





MrBcx

#3
[UPDATE]


I ran the current Tablacus (ver 1.2.5.2) Setup.exe and confirmed that
tsc64.dll was copied and registered in \Windows\System32\

Next, I fired up BED, copied the sample code that I posted earlier, set the target
to 64-bit
and successfully compiled and ran using Pelles, MSVC, and Mingw compilers.
( I don't use the 64-bit version Lcc-Win32 )


So ... there you go.  BCX + 64-bit VBScript control works!

https://tablacus.github.io/scriptcontrol_en.html

JoeC4281

Hi Kevin;

Indeed,
your code compiled with no problems (I use  Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32532 for x64),
and the .EXE works as it should.

Robert,
please update the help file to include this info for the VBS_ functions.

Thanks guys!

Joe

Robert

Quote from: JoeC4281 on October 13, 2023, 11:39:51 AM
Hi Kevin;

Indeed,
your code compiled with no problems (I use  Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32532 for x64),
and the .EXE works as it should.

Robert,
please update the help file to include this info for the VBS_ functions.

Thanks guys!

Joe

Hi Joe:

I have added to the BCX Documentation, on the BCX Scripting page, a note and a link to Gaku's Tablacus Script Control 64.

Thanks for the information and suggestion.

Vortex

#6
Hello,

TablacusScriptControl is a very nice project. Sadly, they are going to retire VBScript :

https://techcommunity.microsoft.com/blog/windows-itpro-blog/vbscript-deprecation-timelines-and-next-steps/4148301

I hope we can find a way to install TablacusScriptControl after this retirement.

JoeC4281

Quote from: Vortex on March 10, 2025, 01:15:47 PM
Hello,

TablacusScriptControl is a very nice project. Sadly, they are going to retire VBScript :

https://techcommunity.microsoft.com/blog/windows-itpro-blog/vbscript-deprecation-timelines-and-next-steps/4148301

I hope we can find a way to install TablacusScriptControl after this retirement.

Here's the link to the VBScript.dll source code that is used in Wine;

https://github.com/alexhenrie/wine/tree/master/dlls/vbscript

Here's the link to the VBScript.dll source code that is used in ReactOS;

https://doxygen.reactos.org/d1/d4b/dll_2win32_2vbscript_2vbscript_8c_source.html

I'm sure that it can be made to work in Windows 10/11 and beyond.

With SxS,
you could also just put VBScript.dll
and the TablacusScriptControl in your apps BIN folder,
and use them from there.

BTW, the TablacusScriptControl can also be installed and used in Wine.

Joe