I've been working to convert a number of my highway design tools from LISP to .NET. I have a fairly extensive lisp library and it's not practical to rewrite the entire library - as such I need to access lisp variables in .NET.
I've been using a the following:
' Use P/Invoke for acedGetSym
<DllImport("acCore.dll", CharSet:=CharSet.Unicode, _
CallingConvention:=CallingConvention.Cdecl, EntryPoint:="acedGetSym")> _
Shared Function acedGetSym(ByVal args As String, <Out()> ByRef result As IntPtr) As Integer
End Function
' Use P/Invoke for acedPutSym
<DllImport("acCore.dll", CharSet:=CharSet.Unicode, CallingConvention:=CallingConvention.Cdecl, EntryPoint:="acedPutSym")> _
Shared Function acedPutSym(ByVal args As String, ByVal result As IntPtr) As Integer
End Function
'use P/Invoke for acedInvoke
<DllImport("acCore.dll", CallingConvention:=CallingConvention.Cdecl, EntryPoint:="acedInvoke")> _
Private Shared Function acedInvoke(ByVal args As IntPtr, ByRef result As IntPtr) As Integer
End Function
Which compiles and works well in Autodesk (and thanks to The Swamp for the help with this).
I'd like to modify to use in Bricscad. I'm assuming the "acCore.dll" will be replaced with "BRX13.dll" but need the new EntryPoint values. (anything else?)
Thanks for the help in advance!