Not applicable
10-10-2018
10:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have the below code, works perfectly in AutoCAD 2015 32 bit
we are looking to upgrade to AutoCAD 2019 64 bit, but this code is causing AutoCAD to crash
after searching the internet I tried changing "?acedGetSym@@YAHPB_WPAPAUresbuf@@@Z" to x64: "acedGetSym" or "?acedGetSym@@YAHPEB_WPEAPEAUresbuf@@@Z" and even just "acedGetSym" but i still get the error
This is the error.
<System.Security.SuppressUnmanagedCodeSecurity> <DllImport("accore.dll", CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Unicode, EntryPoint:="?acedGetSym@@YAHPB_WPAPAUresbuf@@@Z")> Private Shared Function acedGetSym(args As String, ByRef result As IntPtr) As Integer End Function Public Shared Function GetLispSym(name As String) As String Dim ip As IntPtr = IntPtr.Zero Dim status As Integer = acedGetSym(name, ip) If status = CInt(PromptStatus.OK) AndAlso ip <> IntPtr.Zero Then Dim resbuf As ResultBuffer = ResultBuffer.Create(ip, True) For Each tv As TypedValue In resbuf Return tv.Value.ToString.ToUpper Next End If Return Nothing End Function End Class
Solved! Go to Solution.
Link copied