Results 1 to 3 of 3

Thread: Using thincore.dll with Visual Basic 6.0

  1. #1

    Using thincore.dll with Visual Basic 6.0

    I would like to use thincore.dll with Visual Basic 6.0

    I looked in the \thinBasic\sdk\,
    and found thinBasic BASIC SDK\PB,
    which I could use as a reference for embedding in VB6.

    Before I do so,
    I was wondering if anyone has already created a thinBasic SDK for VB6,
    and would be interested in sharing it.

    My end goal is to create a COM DLL,
    which I can use with Visual Basic 6.0,
    Visual FoxPro 9.0,
    and other COM-callable languages.

    I occasionally use AutoIt, which comes with AutoItX, a DLL/COM control.
    Add AutoIt features to your favorite programming and scripting languages!
    Also features a C# assembly and PowerShell CmdLets.
    Perhaps a future addition to thinBasic could be something similar,
    maybe a thinBasicX COM DLL,
    which is what I am hoping to do with VB6 and thincore.dll

    Regards and Thanks,


  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Milan - Italy
    Rep Power
    Hi Joe,

    thanks for your suggestion, I will check what I can do.
    thinBasic Core engine is written using Power Basic compiler and should definitely possible to develop COM components using it.

    Eros | |
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  3. #3
    I'm having issues in getting thinCore.dll working with Visual Basic 6.0
    Option Explicit
    ' Microsoft Visual Basic 6.0 (SP6)
    ' Windows 10 [Version 10.0.19045.3693] 22H2
    ' AddIn Used - Visual Basic 6 IDE Linker Addin
    ' - LinkSwitches /SUBSYSTEM:CONSOLE
    ' Ref:
    ' Ref:
    ' thinCore.dll is in my App.Path folder
    Declare Function thinBasic_Init Lib "thinCore.dll" (ByVal hWnd As Long, _
                                                        ByVal cInstance As Long, _
                                                        ByVal sKey As String) As Long
    Declare Function thinBasic_Release Lib "thinCore.dll" (ByVal hScript As Long) As Long
    Declare Function thinBasic_Run Lib "thinCore.dll" (ByVal hScript As Long, _
                                                        ByVal sBuffer As String, _
                                                        ByVal BufferType As Long, _
                                               Optional ByVal Options As Long, _
                                               Optional ByVal DebugMode As Long, _
                                               Optional ByVal LogMode As Long, _
                                               Optional ByVal ObfuscateMode As Long, _
                                               Optional ByVal CallingProgram As Long, _
                                               Optional ByVal DependancyMode As Long) As Long
    Dim Con As New Console
    Dim hScript As Long
    Dim sScript As String
    Dim hRun As Long
    Const thinBasic_BufferType_IsFile = 0
    Sub Main()
      On Error GoTo CatchError
      sScript = "E:\Documents\vb6\ThinBasic\Alert.tBasic"
      Con.OutStd ("App.hInstance = " + Str$(App.hInstance))
      Con.OutStd ("App.Path      = " + App.Path)
      Con.OutStd ("Init")
      hScript = thinBasic_Init(0, App.hInstance, "")
      Con.OutStd ("Run")
      hRun = thinBasic_Run(hScript, sScript, thinBasic_BufferType_IsFile, 1 Or 2, False, False, False, 1, False)
      'Program quits here
      'From IDE: Run-time error '0'
      'From EXE: No error, Alert.tBasic is not run
      'App.hInstance =  4194304
      'App.Path      = E:\Documents\vb6\ThinBasic
      Con.OutStd ("Release")
      thinBasic_Release (hScript)
      Exit Sub
      Con.OutStd (Err.Number)
      Resume Next
    End Sub
    The program quits when thinBasic_Run is called.

    I have probably missed something in the translation of the Declare functions.

    Constructive assistance would be appreciated.

    Attached Files Attached Files

Similar Threads

  1. Where is latest file?
    By gddeluca in forum thinBasic General
    Replies: 4
    Last Post: 05-07-2021, 00:39
  2. Visual free basic
    By ReneMiner in forum Other languages
    Replies: 0
    Last Post: 25-05-2021, 04:49
  3. thinCore as embeddable 3rd party DLL
    By ErosOlmi in forum Suggestions/Ideas discussions
    Replies: 21
    Last Post: 04-09-2009, 01:11
  4. Replies: 12
    Last Post: 13-06-2009, 22:00
  5. Need confirmation on thinCore speed
    By ErosOlmi in forum thinBasic General
    Replies: 18
    Last Post: 12-10-2007, 10:36

Members who have read this thread: 4

Posting Permissions

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