简体   繁体   English

覆盖UWP中的WinSxS机制。 专门用于ComCtl32.dll

[英]Override WinSxS mechanism in UWP. Specifically for ComCtl32.dll

I am creating a Universal Windows App which uses a dynamic library (wkhtmltopdf) that seems to have a dependency on comctl32.dll through its Qt implementation. 我正在创建一个使用动态库(wkhtmltopdf)的通用Windows应用程序,该库似乎通过其Qt实现依赖于comctl32.dll。 Now, I am able to run the application just fine on my development machine (Windows 10 Pro 1607 Build 14393.1770) however, on the target machine (Windows 10 Enterprise 2015 LTSB) I get the following error: 现在,我能够在开发计算机(Windows 10 Pro 1607 Build 14393.1770)上很好地运行应用程序,但是,在目标计算机(Windows 10 Enterprise 2015 LTSB)上,出现以下错误:

LdrpInitializeNode - ERROR: Init routine 67ABDD60 for DLL "C:\\Windows\\WinSxS\\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.10240.16384_none_49c02355cf03478c\\COMCTL32.dll" failed during DLL_PROCESS_ATTACH LdrpInitializeNode-错误:DLL“ C:\\ Windows \\ WinSxS \\ x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.10240.16384_none_49c02355cf03478c \\ COMCTL32.dll”的初始化例程67ABDD60在DLL_PROCESS_ATTACH期间失败

When running the application I noticed my dev machine has different version of this library (5.82.14393.447). 运行该应用程序时,我发现我的开发机具有该库的不同版本(5.82.14393.447)。 I understand comctl32.dll 6.0 is not redistributable but I haven't seen the same remark for 5.82. 我知道comctl32.dll 6.0无法重新分发,但我没有看到5.82的注释。 I still decided to package my version of the library and call LoadPackagedLibrary manually. 我仍然决定打包我的库版本,并手动调用LoadPackagedLibrary This, on my dev machine ends up loading both version (as shown in the Visual Studio Modules window); 在我的开发机上,这最终加载了两个版本(如Visual Studio模块窗口中所示)。 on my target machine, it loads the "newer" version yet still tries to load the one on WinSxS and the failure still happens: 在我的目标计算机上,它加载“较新”版本,但仍尝试在WinSxS上加载该版本,并且失败仍然发生:

LdrpPreprocessDllName - INFO: DLL COMCTL32.dll was redirected to C:\\Windows\\WinSxS\\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.10240.16384_none_49c02355cf03478c\\COMCTL32.dll by SxS LdrpPreprocessDllName-信息:DLL COMCTL32.dll被SxS重定向到C:\\ Windows \\ WinSxS \\ x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.10240.16384_none_49c02355cf03478c \\ COMCTL32.dll

It seems I simply do need to make WinSxS not load its version of ComCtl32.dll since, I hacked by replacing C:\\Windows\\WinSxS\\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.10240.16384_none_49c02355cf03478c\\COMCTL32.dll in the target machine with my version of the library. 看来我确实确实需要使WinSxS 加载其ComCtl32.dll版本,因为我通过用目标计算机替换C:\\Windows\\WinSxS\\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.10240.16384_none_49c02355cf03478c\\COMCTL32.dll而被黑客入侵我的图书馆版本。 However, this is not desired. 但是,这是不希望的。

Is there a way to redistribute the working version of ComCtl32.dll such that it won't try to load it from WinSxS? 有没有一种方法可以重新分发ComCtl32.dll的工作版本,使其不会尝试从WinSxS加载它? Perhaps through a manifest file or a running an MSI on the target machine? 可能是通过清单文件还是在目标计算机上运行MSI?

Comctl32 is not supported at all for UWP. COMCTL32是不是在所有的UWP支持。 Even if you manage to get it to "work" it might break at any point in time - - if you run the Windows App Certification Kit (WACK) on your project it will give you errors. 即使您设法使其“正常运行”,它也可能在任何时候中断--如果在项目上运行Windows App认证工具包(WACK),它将给您带来错误。

I'm pretty sure Fusion (the thing that supports binding to different DLL versions) is disabled for UWP as well. 我敢肯定,UWP也禁用了Fusion(支持绑定到不同DLL版本的东西)。 Because apps are self-contained and don't install / share system libraries like legacy apps, binding redirection is not needed. 由于应用程序是独立的,并且不像传统应用程序那样安装/共享系统库,因此不需要绑定重定向。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 UWP。 如何实现应用内订阅? - UWP. How to implement an in-app subscription? UWP。 将在Microsoft Store中显示的应用程序的名称 - UWP. The name of the app that will appear in the Microsoft Store UWP的kernel32.dll中的SetThreadExecutionState类似物 - Analog of SetThreadExecutionState in kernel32.dll for UWP Windows 10 UWP。 如何免费测试IAP? - Windows 10 UWP. how to test IAP without being charged? UWP。 更改 .appxmanifest 是否会触发要删除的本地应用程序数据? - UWP. Is changing .appxmanifest triggers local app data to be removed? UWP。 如何在不使用 DropShadowPanel 的情况下在代码中实现投影 - UWP. How To Implement drop shadow in code without using DropShadowPanel in UWP。 如何找出uwp-c#Windows.Storage元素的大小? - UWP. How to find out size of uwp-c# Windows.Storage element? 我想在uwp中弹出时用黑色阴影模糊父网格。 有什么办法可以在uwp中实现 - I want to blur my parent grid with black shade at the time of popup in uwp. Is there any way to implement this in uwp UWP中的模板控制与自定义控制。 网上找不到明确的答案 - Templated Control vs Custom Control in UWP. No clear answer found online UWP。 尝试异步下载图片并获取System.Exception:同步调用异步,“编组为另一个线程” - UWP. Trying to async download pictures and get System.Exception: Calling Async synchronously, 'marshalled for a different thread'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM