TheSwamp
Code Red => .NET => Topic started by: squirreldip on November 15, 2013, 02:26:08 AM
-
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!
-
I used a DLL viewer to look at BRX13.DLL and it seems the entry points are the same. Does anyone have any experience with P/Invoke in Bricscad and possibly solution?
-
Bricscad v13:
BrxMgd.dll
(http://i.imgur.com/2QwfZVC.png?1)
-
Thanks for the reply - I'll give it a try (and much simpler than Acad...)