i created a c# dll which call a c++ dll. For this am am doing a simple DLLimport. This worked fine on all of my Windows 7 machines but now i tried to run it on a Windows 10.. When executing a c# function then i get an error that the called c++ dll cannot be found. (System.DllNotFoundException).
The c# and c++ dll are in the same directory. I tried to copy both files to the exe file that calls the c# library ->no luck
I tried to copy both files to system32 -> no luck.
Where do i have to copy them so that c# "sees" the c++ dll? Any way to tell windows where to search?
Thanks for help
Edit: The C# and C++ dll are developed with "Visual Studio Express 2015". On the windows 10 system i installed Microsoft Visual C++ 1010/2012/2013/2015 Redistributable x86/x64 The exception is: An exception occurred inside the call to .NET member 'function_Cs': System.DllNotFoundException: Die DLL "The_C++_library.dll": Das angegebene Modul wurde nicht gefunden. (Ausnahme von HRESULT: 0x8007007E) kann nicht geladen werden. bei C#library.C#library.function(Int32 a, Int32 b, Int32& res)
The problem is not that the C++ DLL is in the wrong place; the problem is that it cannot be loaded. Most likely it depends on a version of the Microsoft C++ Runtime Library that is not available by default on Windows 10. You can verify this by checking the status of dependent DLLs via Dependency Walker. You can either:
User contributions licensed under CC BY-SA 3.0