Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: ThinBASIC COM Server

  1. #1

    ThinBASIC COM Server

    Please find in the attached file the first experimental version of ThinBASIC COM server, it supports the dual interface so you can use it for launch of ThinBASICs’ script from .VBS script, .JS script and VBA as well using the Dispatch interface from other languages (please see the TBCOMSRV.INC for use it from Power Basic).

    Warning: this is a trial version that will expire at December 31, 2008.

    There are the four methods available, here is a brief syntax explanation of them:

    Initialize() Method
    The Initialize method initializes the interpreter for use by client application (for example a not ThinBASIC script).

    Syntax
    Initialize(sUser As String, sKey As String, Flag As Long, hWnd As long, hInstance As Long)

    Parameters
    sUser A valid user name, for trial pass "EveryOne"
    sKey A valid key, fro trial pass "TrialVersion"
    Flag Not used, pass 0
    hWnd Handle to the owner window. If no owner window pass 0
    hInstance Handle to application instance. If no instance pass 0

    Run() Method
    The Run method executes a ThinBASIC's script.

    Syntax
    Run(sScript As String, sCmdLine As String, Options As Long)

    Parameters
    sScript The ThinBASIC's Script to execute
    sCmdLine Command line to pass to the script *
    Options Not used, pass 0

    * Actually this parameter isn't available

    Free() Method
    The Free release the interpreter and close all open resources.

    Syntax
    Free()

    Parameters
    This method has no parameters

    DisplayInfo() Method
    The DisplayInfo method display information about the COM server.
    This method is also useful to check if the COM server is configured properly.

    Syntax
    DisplayInfo()

    Parameters
    This method has no parameters

    The zip file also include some exalmples files (VBS, JS and Excel).

    How use it:
    You should copy the ThinBASIC.DLL file in the ThinBASIC’s installation root (C:\THINBASIC for example), open the command prompt then go to the ThinBASIC installation root and run this command: regsvr32 ThinBASIC.dll.
    Now you are ready to use and test the COM Server.

    As usual your feedbacks and suggestions are welcome.

    Thank you very much and best regards,
    Roberto
    Attached Files Attached Files
    http://www.thinbasic.com

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: ThinBASIC COM Server

    Hi Roberto,

    what a great news!
    I supppose this can open a big new development area.

    Thanks for this preview.
    Eros

    Just a little note: the script you are using as example is not existing. You should execute a script like:
    C:\thinBasic\SampleScripts\General\Speed\Test_Speed.tBasic
    that should be present in all thinBasic installation (if thinBasic has being installed under C:\thinbasic\ directory)

    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #3

    Re: ThinBASIC COM Server

    Updated with an existing ThinBASIC's script, sorry for the inconvenience.

    Roberto
    http://www.thinbasic.com

  4. #4
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: ThinBASIC COM Server

    Hi Roberto,

    thanks a lot for this new feature, seems like powerful thing!

    I moved DLL to path where thinBasic.exe is, registered the library and modified paths in VBS and JS scripts.
    Only trouble is, that for successful execution I have to place VBS and JS in same directory with thinBasic. Is it correct?

    I did not succeeded in Excel, can be because of that path complication, will investigate further.


    Thanks a lot,
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  5. #5

    Re: ThinBASIC COM Server

    Hi Petr,

    just for now the server has a limitation that can run script only on the same disk, this is due to the algorithm used for discovery the interpreter's path.
    For example if you have ThinBASIC installled on F:\ThinBASIC you could run scripts located in F:\ or F:\MyFolder1\MyScript\Test but not in C:\.
    If you run the TestTBCOMSRV.js from a variousness of locations it should tell you if it finds and where is the interpreter.

    Thanks for your testing.

    Ciao,
    Roberto
    http://www.thinbasic.com

  6. #6
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: ThinBASIC COM Server

    Hi Roberto,

    thanks for the explanations!
    But I think there is still some trouble

    I have thinBasic installed here: E:\Util\ThinBasic\

    When I run TestTBCOMSRV.js from there, it correctly reports that it found core library.
    If I run it from E:\Util\ThinBasic\COMServerTest\, then I get report on attached screenshot.

    Maybe the msgbox could contain some more info which could ease finding problems?


    Petr
    Attached Images Attached Images
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  7. #7

    Re: ThinBASIC COM Server

    Hi Petr,

    I've updated the ZIP file, now if you have the ThinBASIC install path into the register the COM server should retrive and use for detect the interpreter.

    Ciao,
    Roberto
    http://www.thinbasic.com

  8. #8
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: ThinBASIC COM Server

    Hi Roberto,

    perfect job, all works now

    One thing - in case I specify not existing script file, it makes GPF in Windows Based Script Host or something like that.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  9. #9
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: ThinBASIC COM Server

    Roberto, all the tests worked fine that I could test. I couldn't test the spreadsheet one as I don't have a spreadsheet app installed on this computer at the moment.
    Thanks!
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  10. #10

    Re: ThinBASIC COM Server

    Thanks to all!

    Petr,

    the GPF appears in Windows Based Script Host but it seems related to a lack of "sanity checks" into thincore.dll.
    However we will see to do something on thinbasic.dll or thincore.dll.

    Ciao,
    Roberto
    http://www.thinbasic.com

Page 1 of 2 12 LastLast

Similar Threads

  1. thinBasic CGI test server
    By ErosOlmi in forum CGI and FastCGI
    Replies: 2
    Last Post: 17-08-2010, 09:19
  2. HW upgrade on thinBasic.com Web Server
    By ErosOlmi in forum Announcements
    Replies: 3
    Last Post: 09-06-2008, 10:31

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •