c++/cli DLL fails under Win 8.1
Asked Answered
D

1

18

i have written a Win32/net DLL, it works fine under Win XP, Win7 and 8 but under Win 8.1 it fails.

Dependency Walker says: API-MS-WIN-CORE-KERNEL32-PRIVATE-L1-1-1.DLL not found (user32.dll will call them)

Google means, MS changed some System-DLLs in 8.1 (and ignored compatibility), so that many programs have the same problem.

Full list with "file not found":

API-MS-WIN-CORE-KERNEL32-PRIVATE-L1-1-1.DLL
API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.DLL
MSVCR120.DLL
API-MS-WIN-CORE-SHUTDOWN-L1-1-1.DLL
API-MS-WIN-SERVICE-PRIVATE-L1-1-1.DLL
EXT-MS-WIN-NTUSER-UICONTEXT-EXT-L1-1-0.DLL
IESHIMS.DLL

Does someone have a idea how to fix this?

Durrace answered 20/6, 2014 at 21:18 Comment(6)
Why it "fails" exactly (start error message etc.?) and what´s the relevance of dependency walker? (besides, isn´t that thing long outdated)?Sharpeyed
You need to stop using Depends.exe, it has not been maintained in a very long time. Lots of things it cannot deal with anymore, including DLLs with forwarded exports like these api*.dll files. If you need help then you must be specific about "it fails".Floeter
@HansPassant: In my experience, it supports forwarded exports just fine. It's the changed DLL search order that confuses it.Housekeeping
Ty for your comments, i found the problem, i forgot to install the C++ 2010 Redistributable as x86 VersionDurrace
I'd recommend re-opening this. I'm having the same issues embedding python with boost.python. This is not an off-topic conversation.Nightstick
For future readers (and to enhance @Durrace 's answer), I got this same issue and depends.exe report as above. I had to install a more recent version of C++ Redistributable, my magic nugget was version 2015, and I installed both x86 and x64. There are 2013, 2012, 2010, 2008 and 2005 versions. I suggest installing them in reverse order until you find the magic nugget. So C++ 2015 Redistributable, x86 and x64, then C++ 2013 Redistributable, x86 and x64....etc, etc. What a pain!Account
N
19

Dependency Walker's static analysis is not to be relied upon. The fact that Dependency Walker reports issues with those DLLs based on its static analysis does not mean that this is indeed your problem. It is normal for perfectly fine executables to report problems as you describe under static analysis, and yet execute perfectly well.

Right now I'm looking at Dependency Walker's assessment of my application and I see the exact same list of supposedly problematic files as you do. But the application runs perfectly well. Simply put, you are looking at a false positive.

Microsoft has certainly not ignored compatibility when upgrading operating systems. On the contrary, it goes to extraordinary lengths to maintain good compatibility.

If you want to use Dependency Walker to debug dependency problems with native DLLs, then you really need to use it in dynamic mode, using the Profile menu. This will tell you which dependency fails to load at runtime, if indeed that is your problem. But depending on exactly where the balance is between managed and unmanaged, it may be that Dependency Walker is not the right tool for the job.

And your problem may not be an issue with native dependencies. The first step is for you to diagnose exactly what the problem is. That's beyond the scope of this question because we don't have any details of the errors that you encounter.

Nitaniter answered 20/6, 2014 at 21:32 Comment(8)
My Problem is, that the Application (not from me) that uses my dll, only show a message that it cant load my dll.Durrace
So you need to debug that. My point is that the problem is not as you have diagnosed. MS compat is fine. If your dll is unmanaged then use profile mode of dependency walker to find the problem.Nitaniter
i cant use profile mode with my dll, the start option is grayDurrace
No, you cannot execute a dll. You need to execute an executable. If the host is a managed process then you may need a different tool. Not sure if dependency walker does the job.Nitaniter
The bottom line is that the diagnosis in the question is wrong.Nitaniter
Ok epic fail :-/ I forgot to install Visual C++ Redistributable 2010/2013 as x86 Version on my Windows 8.1 Testsystem.Durrace
So, pretty much as I said all along then. ;--)Nitaniter
Assuming you are right, what happens when SHELL32 calls function #270 in SHLWAPI.DLL (which does not have it) ? Now, according to dependency walker, under some circumstances, which we cannot really comprehend because Windows is closed source, SHELL32 will attempt to call that function, which will fail ... this probably explains why Windows is unstable ...Ac

© 2022 - 2024 — McMap. All rights reserved.