How to Load Dll (Module Could Not Be Found Hresult: 0X8007007E)

C# Unable to load DLL (Module could not be found HRESULT: 0x8007007E)

The most likely reason is that the machine which does not have Visual Studio installed is missing the C++ runtime that is needed by your unmanaged DLL. Install the appropriate C++ runtime from the downloadable redistributable.

Do make sure that your unmanaged DLL is linked against the release runtime and not the debug runtime. The latter cannot be redistributed.

You can debug unmanaged DLL dependency issues using tools like Dependency Walker, Process Monitor etc.

Unable to load dll file - exception 0x8007007E

I suspect that even though the setup is for X86, the project itself is AnyCPU and thus runs as a 64bit process on 64bit systems and as a 32bit process on 32bit systems. As you said your DLL is in the Program Files (x86) folder I assume it is 32bit only, so you should compile your application explicitly as x86, too. It is your bullet #7 that leads me to this conclusion.

Just copying the nianlys.dll 64bit DLL doesn't seem to work as it seems to rely on other DLLs it then can't find. (bullet #8).



Related Topics



Leave a reply



Submit