Use a 32-bit assembly in 64-bit environment

故事扮演 提交于 2019-12-01 08:54:59

You cannot load a DLL of one "bitness" into a process running as another "bitness". All you can do to solve the problem is align the platforms or run the other "bitness" DLL in it's own process.

I had to do this once for a 64-bit application that accepted plug-ins. I created a 64-bit shim DLL that went into the application and talked to a 32-bit process via IPC. This 32-bit process was required due to a third-party DLL also being 32-bit.

It was a proper pain in the backside, but unfortunately a required pain as the other vendor didn't have 64-bit support at that time.

You can control this other 32-bit process from your 64-bit shim using the Process related classes in .NET - this is actually what I ended up doing.

You can't mix 32 bit code and 64 bit code in the same process. You'll need to use two processes by one means or another, or find a way to use all 32 bit or all 64 bit.

The express versions of Visual Studio do not support 64 bit targets. If you purchase the standard version then you may be able to recompile the plug-in in 64 bit mode. Note however, that it may not be that simple because you may need to modify the code in case it contains assumptions about bitness.

A possibly easier option would be to use the 32 bit version of 3ds.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!