.NET

.NET

Reply
Valued Contributor
95 Posts
3 Kudos
Registered: ‎04-04-2012
Post 1 of 3
Accepted Solution

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

244 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
738 Posts
100 Kudos
Registered: ‎08-06-2002
Post 2 of 3

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
95 Posts
3 Kudos
Registered: ‎04-04-2012
Post 3 of 3

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:
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!