Win 7, 64 bit, dll problems

匿名 (未验证) 提交于 2019-12-03 02:10:02

问题:

I have a problem with our executable. I'm running this C++ 32-bit executable on my Win-7 64-bit development box that also has all those MS applications (Visual Studio 2008 + 2010, TFS, SDK, MS Office)... And its still running just fine.

Now I got the client installation of the very same program and wwas asked to test it with a clean Win-7 installation. Thus i got I Win-7 64-bit VM Ware and updated it to Win-7 SP 1 (the very same version my developer box is tunning). But while on my developer box everything is fine the program does not work with the VW Ware (30 days trial) box.

The x86 dependency walker is telling me that the following DLLs are missing:

  • API-MS-WIN-CORE-COM-L1-1-0.DLL
  • API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
  • API-MS-WIN-CORE-WINRT-L1-1-0.DLL
  • API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
  • API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
  • API-MS-WIN-SHCORE-SCALING-L1-1-0.DLL
  • DCOMP.DLL
  • GPSVC.DLL
  • IESHIMS.DLL

I googled for those API-MS-WIN-... dlls and found they should actually already be part of Win-7 (some sites claiming the belong to Win-8 and Win 2012 server though).

I already tried the suggested fixes I found, which are:

  • running 'sfc /scannow'
  • installing Visual Studio 2008 SP1 runtime executables

But that didn't solve anything. :-(

Side note: My development box does not have them either, and does not seem to need them. For example the user32.dll on my box does not link against one of those, while the installation on the VM ware does.

Any idea on how to fix this issue? I tried to find a suitable download / fix on the MS pages but failed.

Regards, Thomas


After solving my issue I wanted to report what I found out, and I can't post this as an answer because the question has been closed.

Actually all the DLLs reported missing by the dependency walker tool, nameley those

* API-MS-WIN-CORE-...   

type DLLs were not part of the actual problem.

In my case the registration of 3 OCX files was missing and after that everything was just fine, BUT dependency walker tool still listed all the very same DLLs as before even when the program was just running fine now.

The gist of it: As someone elsewhere stated, the tool is a bit dated by now and does not always work properly with newer OS. Thus keep an eye open and don't get mislead by missing 'API-MS-WIN-CORE-COM-L1-1-0.DLL', ... the problem probably lies entirely elsewhere.

回答1:

This problem is related to missing the Visual studio "redistributable package." It is not obvious which one is missing based on the dependency walk, but I would try the one that corresponds with your compiler version first and see if things run properly:

VS 2015

VS 2013

VS 2010

VS 2008

I ran into this problem because I am using the VS compilers, but not the full VS environment.



回答2:

Me too, I just resolved the same problem with C++ Qt5 and W7 64bits with MSCVC 2012.

In the beginning I thought It was a MSVC/windows dll problem, but as BorisP said, the problem was in my project dependencies. The key is "How to know your project dependencies in Qt5?".

As I didn't find any clear way to know it (Dependency Wolker didn't help me a lot...), I followed next "inverse procedure" that takes no more than 5 minutes and avoid a lot of headaches with Dlls dependencies:

  1. Compile your project and take the executable file to an empty folder: myproject.exe
  2. Try to execute it, It will retrieve an error (missing dlls...).
  3. Now, copy all the dlls from Qt (in my case they were in C:\Qt\Qt5.1.1\5.1.1\msvc2012_64_opengl\bin) to this folder.
  4. Try to execute again, it will probably works fine.
  5. Start to delete progressively and try every time your executable still works, trying to leave the minimum necessary DLLs.

When you have all the DLLs in the same folder it is easier to find which of them are not valid (XML, webkit... whatever..) , consequently this method don't take more than five minutes.



回答3:

I just resolved same problem.

Dependency Walker is misleading in this case and caused me to lose time. So, the list of "missing" dlls from first post is not helpful, you can probably ignore it.

The solution is to find which references your project is calling and check if they are really installed on server.

@Ben Brammer, it is not important which 3 .ocx files are missing because they are missing only for Leo T Abraham's project. Your project probably calls other dlls.

In my case, it was not 3 .ocx files, but missing MySQL connector dll. After installing of MySQL Connector for .Net on server, the problem disappeared.

So, in short solution is: check if all your project references are there.

Cheers



回答4:

As mentioned, DCOMP is part of the VC++ redistributables (implementing the OpenMP runtime) and is the only truly missing component. All the rest are false reports.

Specifically API-MS-WIN-XXXX.DLL are API-sets - essentially, an extra level of call indirection introduced gradually since windows 7. Dependency walker development seemingly halted long before that, and it can't handle API sets properly.

So nothing to worry about there. You're not missing anything more.

A better alternative to find the truly needed DLLs that are missing (if that is indeed the problem) is to run ProcessMonitor and step backwards from the failure, searching for sequences of failed probes for a specific DLL in all the system path.



回答5:

I also ran into this problem, but the solution that seems to be a common thread here, and I saw elsewhere on the web, is "[re]install the redistributable package". However, for me that does not work, as the problem arose when running the installer for our product (which installs the redistributable package) to test our shiny new VS 2015 builds.

The issue came up because the dlls listed are not located in the Visual Studio install path (e.g. C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist) and thus had not been added to the install. These api-ms-win-* dlls get installed to a Windows 10 SDK install path as part of the Visual Studio 2015 install (e.g. C:\Program Files (x86)\Windows Kits\10\Redist). Installing on Windows 10 worked fine, but installing on Windows 7 required adding these dlls to our product install. For more info see https://support.microsoft.com/en-us/kb/2999226 which describes the addition of these dependencies caused by VS 2015 and provides downloads for various Windows platforms; also see https://blogs.msdn.microsoft.com/vcblog/2015/03/03/introducing-the-universal-crt/ which describes the redesign of the CRT libraries. Of particular interest is item 6 under the section titled Distributing Software that uses the Universal CRT:

Updated September 11, 2015: App-local deployment of the Universal CRT is supported. To obtain the binaries for app-local deployment, install the Windows Software Development Kit (SDK) for Windows 10. The binaries will be installed to C:\Program Files (x86)\Windows Kits\10\Redist\ucrt. You will need to copy all of the DLLs with your app (note that the set of DLLs are necessary is different on different versions of Windows, so you must include all of the DLLs in order for your program to run on all supported versions of Windows).



回答6:

This Solved the issue for me.
Uninstall VS 2010 redistributable package if you have it installed already then install Microsoft Windows 7 SDK



回答7:

This contribution does not really answer the initial question, but taking into account the hit-rate of this thread I assume that there are quite a few people dealing with the problem that API-MS-WIN-CORE- libraries cannot be found.

I was able to solve a problem where my application refused to start with the error message that API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL is not found by simply updating Visual Studio.

I don't think that my build environment (Win7 Pro SP1, Visual Studio Ultimate 2012) was messed up completely, it worked fine for most of my projects. But under some very specific circumstances I got the error message (see below).

After updating Visual Studio 11 from the initial CD-Version (I forgot to look up the version number) to version 11.0.61030.00 Update 4 also the broken project was running again.

I hope this helped someone!



回答8:

I solved the problem. When I registered the OCX files, I ran it with the Command Window that had been executed as an administrator.



回答9:

i had the same problem. After spend hours search on the web, i found a solution for me. I put the file : combase.dll (C:\windows\system32) together in the realese folder and resolved.



回答10:

Installation MSSQL Management Studio 2014 on freshly installed Windows 7 resolved this problem at our client after 2-day ridiculous battle.



回答11:

for anybody who came here but with photoshop problem: my solution was to uninstall ms vc++ redistributable first x86 and 64 both. Than install one appriopriate to windows version and architecture (86 or 64).



回答12:

I came here with this problem occuring, after trying a fresh Windows 7 OEM install, upgrading to Windows 10.

After some searching of microsoft forums and such I found the following solution which worked for me:

Replace C:\Windows10Upgrade\wimgapi.dll with the one from C:\Windows\System32\wimgapi.dll



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!