1

My Problem is that I am currently porting a rather large library from Win32 to UWP. So far I managed to solve many issues and the App runs fine on my Windows 10 Desktop but fails to do so on an Xbox One.

I already changed the linker paths to their store pendants so we don't compiler against win32 api however only apis which are available on the store, however it could always be that I missed something.

Now the problem is the obvious "could not find depdendent dlls (0xc0000135)", which I cannot catch using a debugger since it happens during load time where ntdll is loading the exe.

I know the common troubleshooting steps like outlined here How to Determine Which Dll Dependency is Failing to Load in Windows Store/Universal Apps?

So I used Dependency Walker which shows that my DLL is actually only dependent on kernel32.dll, ws2_32.dll, vccorlib140_app.dll, vcruntime140_app.dll and many dlls in form of API-MS-WIN-CRT-**.dll.

To my understanding this should be fine, however digging further I see that kernel32.dll depends on API-MS-WIN-EVENTING-PROVIDER-L1-1-0.DLL which in turn depends on forbidden advapi32.dll and hence on user32.dll

I don't know if this is correct, though, since on xbox kernel32.dll will have other dependencies.

I also used Process Monitor which would indicate that Kernelbase.AppHost.dll would be the problem since the last confirmed loaded dlls are sechost.dll and the vc++ runtimes. After that there would be kernel.appcore.dll and possibly msvcrt.dll.

I know about gflags.exe +sls, which would be what I need however that doesn't work on the Xbox. Actually I am missing a way to have good debugging on the Xbox in General, I can't even list all files to see which dlls are present and which are not.

So please, does anyone have an idea how I could perform additional checks to find out what fails?

Btw I tried using LoadLibrary() on the DLLs instead of implictly linking them, which leads to GetLastError being 1114 (Unable to initialize) even on the PC, so something is definately odd.

MeFisto94
  • 157
  • 5
  • kernel32.dll is the first red flag. That does not exist on Xbox One (or any other UWP compatible platform other than Desktop) - it should be kernelbase.dll instead. Did you try running WACK? It should tell you all the APIs that are incorrectly linked to your DLLs. – Sunius Jun 22 '17 at 05:55
  • Running WACK is the first step. But note that Kernel32 *does* exist on other platforms, and you can link against it for WACK-allowed APIs. But it is simply a forwarder to KernelBase (or other DLLs). There isn't any real code in it. – Peter Torr - MSFT Jul 14 '17 at 04:51

0 Answers0