.NET

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

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

561 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,114
Registered: ‎04-29-2006
Message 2 of 4 (550 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 (540 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,114
Registered: ‎04-29-2006
Message 4 of 4 (532 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
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!