VB6 and NewLisp?

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
mcturra2000
Posts: 2
Joined: Tue Aug 10, 2004 6:09 pm
Contact:

VB6 and NewLisp?

Post by mcturra2000 »

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?

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

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

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

Once I made a test with VB from V-Studio 2003/.NET using somthing like this:

Code: Select all

    <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

Code: Select all

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
Hans-Peter

Locked