.NET

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

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

225 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: 645
Registered: ‎08-06-2002
Message 2 of 3 (212 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 (168 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:
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

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