Quantcast
Channel: Questions in topic: "dllimport"
Viewing all articles
Browse latest Browse all 160

Issue loading unmanaged dll in Editor on Windows 10

$
0
0
I'm wondering if anyone has come across this recently. I just updated to Windows 10 from 8.1. I routinely use C DLLs to communicate with hardware such as motion platforms, both in editor and builds. After upgrading to Win10 I get EntryPointNotFoundException whenever I try to load a DLL in the Editor. Filexists show that the file is there and Dumpbin shows no mangling of names has occurred. The exact same project worked fine in the Editor under Windows 8.1, and it also works in Windows 10 when I build it. I have experimented with recompiling the DLL with different calling conventions, different target platform and different VC versions and so on but I get the same EntryPointNotFoundException on my functions whatever I seem to do. I also get the same exception if I remove the file entirely. I would expect a FileNotFoundException then but that is not the case, even though Fileexists shows false in that case. I have the Visual C++ runtimes installed of course. Using DLLs this way has worked for years, but immediately when upgrading to Windows 10 I get this, and it is annoying not being able to run motion platforms from the Editor when doing queuing etc. This is the same with all versions I have tried, 5.4, 5.5 and 5.6 with Windows 10, and all projects including minimal builds simply calling a single DLL function. I reinstalled Unity as well, tried Win 8 compatibility mode, but all the same. I wonder if there is some way Windows 10 is stricter in how it loads DLLs that affects the Editor but not builds or if there is something else I have missed. Any idea would be very appreciated.

Viewing all articles
Browse latest Browse all 160

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>