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

安稳与你 提交于 2019-12-13 02:35:24

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/36658721/windows-10-mobile-the-specified-module-could-not-be-found-exception-from-hre

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