0

I created an x86 application with Visual Studio 2019 under Windows 7 x64 which is based on two programming languages ​​C# and C++. I created DLLs in C++ after I imported them into the C# project from the menu: Build dependencies> Project dependencies. Not only that, but I added all the DLL dependencies in the same folder where my EXE is located. The problem is that my application works very well under Windows 7 X64 but on Windows 10 I have the HRESULT error. In windows10 i don't have visuel studio installed. it's a test machine.

An unhandled exception has occurred in your application. If you click continue. the application will ignore this error and try to continue. If you click Exit, the application will stop immediately. Unable to load UserTrack. DLL the specified module could not be found (Exception from HRESULT 0x8007007E.

I have tried looking for the dll from absolute path in DLLIMPORT function. i installed also x86: vc_redist.x86.exe and x64: vc_redist.x64.exe to fix the problem.

But Nothing help, always i get the error as above.

Any suggestion please ?

Ðаn
  • 10,934
  • 11
  • 59
  • 95
  • Problem with Windows 10 Updates mostly. What the application seems to fail to load libraries. What you could do is run application from Visual Studio look for debugging stacktrace/logs. – zia khan Aug 18 '21 at 15:20
  • Suggestions here: https://stackoverflow.com/questions/9003072/unable-to-load-dll-module-could-not-be-found-hresult-0x8007007e – Drew Dormann Aug 18 '21 at 15:25
  • Forgetting to *also* deploy the dependencies that the C++ dll needs is a common oversight. Tends to work by accident on a dirty machine, no such luck on a clean one. https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0 – Hans Passant Aug 18 '21 at 15:34
  • I think that it's better to take a look at Dependency Walker (both versions , x86 and x64) and import your main exe file in it, and it loads all dependencies and alert you if you have mismatch in your reference dlls. also nested dlls – Reza Akraminejad Aug 18 '21 at 16:11

0 Answers0