• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    Distinguished Contributor
    Posts: 288
    Registered: ‎04-06-2004

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

    249 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

    Please use plain text.
    *Expert Elite*
    Posts: 1,640
    Registered: ‎04-29-2006

    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
    Please use plain text.
    Distinguished Contributor
    Posts: 288
    Registered: ‎04-06-2004

    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

     

    Please use plain text.
    *Expert Elite*
    Posts: 1,640
    Registered: ‎04-29-2006

    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
    Please use plain text.