2

Recently I wrote a program with VS2019, invoking Tesseract OCR dll compiled in C++ (x64) and display result on a .NET Windows form. Everything works fine on my Windows 10 dev PC. When deployed to Windows Server 2012 (x64), it crashed, complaining that the C++ dlls are not found.

What I tried:

  • Install vc_redist.x64.exe from Microsoft, it's still not work. (Maybe not enough?)
  • Run a simple .NET windows form program on that server, and it works well. (It's not a .NET problem)

Update:

I used Dependency Walker that @Fenixil suggested, and the dlls below are not found:

  • API-MS-WIN-CORE-KERNEL-32-PRIVATE-L1-1-1.DLL
  • API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.DLL
  • API-MS-WIN-SERVICE-PRIVATE-L1-1-1.DLL
  • MF.DLL
  • MFPLAT.DLL
  • MFREADWRITE.DLL
  • API-MS-WIN-CORE-SHUTDOWN-L1-1-1.DLL
  • EXT-MS-WIN-NTUSER-UICONTEXT-EXT-L1-1-0.DLL
  • IESHIMS.DLL
  • SETTINGSYNCPOLICY.DLL
  • WLANAPI.DLL

Those dlls can be found in my dev PC, in C:/Windows/WinSxS, multiple files in same name under different directory. Do they belong to some Windows SP update, or are they in the Win10 platform API? What's the best way to install them instead of simply copying them to production server?

ouflak
  • 2,458
  • 10
  • 44
  • 49
Ted Yu
  • 1,784
  • 1
  • 10
  • 16
  • 5
    You need to provide those "not found" dlls. Note that `vc_redist.x64.exe` does not install debug runtime so make sure that executable is linked against release runtime libraries. – user7860670 Sep 08 '19 at 12:25
  • @VTT Hi I have a list of the dlls not found, is there any way to install them gracefully? – Ted Yu Sep 13 '19 at 00:35
  • @Ted Yu please update your post if you managed to resolve the issue. – fenixil Sep 19 '19 at 03:34

1 Answers1

2

There are multiple versions of vc_redist, you need to provide one that is used in your application. Here is some discussion with vc_redist not found, might be related to your issue.

You can use Dependency Walker tool to check which dlls are missing in the system

fenixil
  • 2,106
  • 7
  • 13
  • Thanks for your suggestion and sorry for my late reply. Those missed dlls are known, which seems to be system dlls under WinSxS, is there any way to install them? Read my updated post. Thanks again. – Ted Yu Sep 13 '19 at 00:37
  • @Ted, unfortunately I never had an issue with these dlls, so I cannot point you to the concrete packages you need to install. However google might help :) It seems that MF dlls are [related to MediaPlayback feature](https://www.thewindowsclub.com/mfplat-dll-was-not-found-on-windows) (try enable it); looks like API-MS are [false-positives](https://stackoverflow.com/questions/24778284/missing-dll-in-dependency-walker), nothing to do with them; – fenixil Sep 13 '19 at 03:09
  • Some others are mentioned [here](https://answers.microsoft.com/en-us/windows/forum/windows8_1-performance/32-bit-application-fails-to-start-after-81-upgrade/b825723e-e2a2-4c8f-bd1f-10446a5d7059) and solution was to install [VS redistr 2013 x86 and x64](https://www.microsoft.com/en-us/download/details.aspx?id=40784) – fenixil Sep 13 '19 at 03:10