Search code examples
c++visual-studio-2015windows-10-universalwindows-10-mobilec++-cx

WIndows-10 Mobile: "The specified module could not be found. (Exception from HRESULT: 0x8007007E)":null


I have a C# app targeting UWP/Windows-10 for desktop & mobile platforms. The C# app calls into native component written in C++. My native C++ code has Visual C++ component extensions(C++/CX). The native code is then packaged as a .dll & bundled along with the app.


The app works perfectly fine on Desktop, i.e when I run it in x86 or x64, Local Machine , but encounters this error while running on Mobile, i.e. on x86 Mobile Emulator or on an ARM device(Nokia 950)

The specified module could not be found. (Exception from HRESULT: 0x8007007E)":null


Basically, I am not able to load my native libraries in Mobile mode.
I have already read this MSDN page. My native C++ code is not using any unsupported api's.


I tried both /"DWINAPI_FAMILY=WINAPI_FAMILY_APP" and /D"WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP", but it didnt help.

Is there a different set of toolchain which I need to use while building native .dll for mobile? My desktop & mobile native .dll's use the same linker settings/flags.
Any help will be highly appreciated


Solution

  • This seems to be Microsoft issue. I have contacts with some Microsoft Program Manager's. I provided them a sample project which exhibits this behavior.
    They analyzed the sample project & said that this indeed was an issue on Microsoft's end.


    The issue here is that when the app is deployed in Desktop mode (x86 or x64 Local Machine) "ucrt is already available on the platform" & hence the app works fine.


    On Mobile platform ucrt is not available & will be pushed only when it is referenced in the project. But due some bug on Microsoft's platform this doesnt seem to happen & I was not able to run the app on Mobile device/emulator.