.NET

Reply
Distinguished Contributor
Posts: 293
Registered: ‎04-06-2004
Message 1 of 4 (442 Views)

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

442 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*
Posts: 1,975
Registered: ‎04-29-2006
Message 2 of 4 (431 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
Posts: 293
Registered: ‎04-06-2004
Message 3 of 4 (421 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*
Posts: 1,975
Registered: ‎04-29-2006
Message 4 of 4 (413 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community