Seeings as VB6 is such a rubbish language, I had the notion of embedding another language inside it. I considered Guile, but it appears to not really like win32. Then I noticed NewLisp, and its dll.
So, I was wondering if it was possible to link VB6 with the DLL, and run scripts. Is it possible? Is there any documentation on this?
I am not familiar with VB6, but there should be no problem to import newlisp.dll. Other users here (i.e. HPW) have imported newlisp.dll into NeoBook from http://www.neosoftware.com , pure basic from http://www.purebasic.com/ and power basic from http://www.powerbasic.com/ and other Windows applications.
Hans-Peter (HPW) is reading this discussion board on a regular basis and should be able to help you. You can also read the chapter about the Win32 DLL in the newlisp manual and lookup DLL usage in VB-6.
Lutz
Once I made a test with VB from V-Studio 2003/.NET using somthing like this:
<DllImport("newlisp.dll", _
EntryPoint:="dllEvalStr", _
CharSet:=CharSet.Ansi, _
CallingConvention:=CallingConvention.StdCall)> _
Public Shared Function Newlisp(ByVal txt As String) As String
' Leave function empty - DLLImport attribute forwards calls to newlisp
End Function
and
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim RetVal As String ' Stores the return value.
Try
RetVal = Newlisp(TextBox4.Text)
MsgBox(RetVal)
Catch ex As Exception ' Catch the error.
MsgBox(ex.ToString) ' Show friendly error message.
End Try
End Sub