.NET

Reply
Valued Contributor
dynamicscope
Posts: 95
Registered: ‎04-04-2012
Message 1 of 3 (204 Views)
Accepted Solution

Problem with loading .NET Arx dll with C++ library in x64 AutoCAD

204 Views, 2 Replies
03-27-2014 07:56 AM

I am trying to load .NET Arx (Object Arx 2010 targeting Any CPU) which refereces C++ (Win32) library in x64 AutoCAD 2012.

 

When I do "netload" the dll, it loads the assembly until the code hits the line of C++ library object.

It seems x64 AutoCAD cannot load C++ (Win32) library.

Am I right? If so, how could I solve this issue?

 

Converting C++ (Win32) library to x64 library? (I do not think this is possible.)

 

If anyone has encountered such problem and solved it, please give me a hand. :smileysad:

 

Thank you.

Unlike managed code, native code can only load in one target architecture. You'll need separate Win32 and x64 native DLLs. You can build separate x86 and x64 managed DLLs that use them, or get fancy and manage the native linking explicitly at runtime (aka "late binding") from a single AnyCPU managed DLL. I don't recommend late binding except in very simple cases where the interface between your code and the native code is truly architecture-neutral.

Distinguished Mentor
owenwengerd
Posts: 635
Registered: ‎08-06-2002
Message 2 of 3 (191 Views)

Re: Problem with loading .NET Arx dll with C++ library in x64 AutoCAD

03-27-2014 09:25 AM in reply to: dynamicscope

Unlike managed code, native code can only load in one target architecture. You'll need separate Win32 and x64 native DLLs. You can build separate x86 and x64 managed DLLs that use them, or get fancy and manage the native linking explicitly at runtime (aka "late binding") from a single AnyCPU managed DLL. I don't recommend late binding except in very simple cases where the interface between your code and the native code is truly architecture-neutral.

--
Owen Wengerd
ManuSoft
Valued Contributor
dynamicscope
Posts: 95
Registered: ‎04-04-2012
Message 3 of 3 (147 Views)

Re: Problem with loading .NET Arx dll with C++ library in x64 AutoCAD

04-01-2014 01:14 AM in reply to: owenwengerd
Thank you. I built separate x86 and x64 DLLs. Then everything has solved. :smileyhappy:
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.