.NET

.NET

Reply
Distinguished Contributor
JeffatICS
Posts: 295
Registered: ‎04-06-2004
Message 1 of 4 (568 Views)

Unable to find an entry point named 'acedInvoke' in DLL 'acad.exe'

568 Views, 3 Replies
07-13-2012 06:00 AM

.net 4 change caused the following code to hang (sample from help file) 

 

any documentation on how do fix this?

 

 

        [System.Security.SuppressUnmanagedCodeSecurity]
        [DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl)]
        extern static private int acedInvoke(IntPtr args, out IntPtr result);

        // Helper for acedInvoke()
        public static ResultBuffer InvokeLisp(ResultBuffer args, ref int stat)
        {
           IntPtr rb = IntPtr.Zero;
           stat = acedInvoke(args.UnmanagedObject, out rb);
           if (stat == (int)PromptStatus.OK && rb != IntPtr.Zero)
               return (ResultBuffer)
              DisposableWrapper.Create(typeof(ResultBuffer), rb, true);
           return null;
        }

 

Thanks

J

*Expert Elite*
_gile
Posts: 2,133
Registered: ‎04-29-2006
Message 2 of 4 (557 Views)

Re : Unable to find an entry point named 'acedInvoke' in DLL 'acad.exe'

07-13-2012 09:21 AM in reply to: JeffatICS

Hi,

 

AFAIK, this is not a related to .NET Framework 4.0 but to the AutoCAD 2013 .NET API.

Replace acad.exe with accore.dll, or, better, use the managed Application.Invoke() method which wraps the ObjectARX acedInvoke method (since A2011).

Gilles Chanteau
Distinguished Contributor
JeffatICS
Posts: 295
Registered: ‎04-06-2004
Message 3 of 4 (547 Views)

Re: Unable to find an entry point named 'acedInvoke' in DLL 'acad.exe'

07-13-2012 11:08 AM in reply to: JeffatICS

Changing acad.exe to accore.dll worked great!

 

Thank You! :smileyhappy:

 

Most of my routines use this code to access lisp api call data. If you know of any examples using Application.Invoke() that does the same I would learn something new.

 

Thanks Again,

Jeff

 

*Expert Elite*
_gile
Posts: 2,133
Registered: ‎04-29-2006
Message 4 of 4 (539 Views)

Re: Unable to find an entry point named 'acedInvoke' in DLL 'acad.exe'

07-13-2012 01:25 PM in reply to: JeffatICS

As P/Invoking acedInvoke, the Application.Invoke() method requires a single argument as ResultBuffer and returns the LISP return value as a ResultBuffer.

Gilles Chanteau
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.