使用getfileversioninfo和verqueryvalue [英] Using getfileversioninfo and verqueryvalue

查看:133
本文介绍了使用getfileversioninfo和verqueryvalue的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的应用程序中使用这两个函数,除了头痛之外我什么都没有。我终于找到了要做什么才能让它链接起来。现在我有一个问题让它运行。我收到一条错误消息,指出您的计算机缺少api-ms-win-core-version-l1-1-1.dll ...



有没有人知道这方面的解决方法?



我尝试过的方法:



我做了一些搜索,是的,它丢失了。这是一个W7盒子,它不在这个盒子上,它也不在我的W10盒子上。关于这个真正讨厌的事情是我使用dumpbin列出程序的导入,它说它正在为函数GetFileVersionInfoW和GetFileVersionInfoSizeW导入该DLL但是根据它使用的文档api-ms-win-core-version-l1 -1-0.dll并且在两台机器上确实存在。



更新为此 - 该程序现在可以在W10盒子上工作但是我不能在任何地方的机器上找到DLL - 我的意思是l1-1-1.dll文件。我搜索了注册表,我发现在任何地方都没有提到它。



这带来了另一个问题 - 加载器如何利用一个无处可寻的DLL机?看来我们已经从DLL地狱变成了DLL巫术。



另一个更新:我想我现在看到的是什么。存在的DLL文件(api-ms-win-core-version-l1-1-0.dll)导出所有四个Version函数。顺便说一句,只有宽字符版本和MBCS版本无处可寻。我认为正在发生的事情是加载器在... l1-1-0.dll中查找有问题的函数,因此它与它们链接并忽略了... l1-1-1.dll不存在的事实。现在,似乎这是它在W10上的工作方式,但它在W7中不是这样的。我认为问题的根源是在文件mincore.lib中为这些函数指定DLL的任何错误。我猜它是一个.DEF文件,但我不知道。

I am trying to use these two functions in my application and I have had nothing but headaches. I finally figured out what to do to get it to link. Now I have a problem getting it to run. I get an error message that states, "api-ms-win-core-version-l1-1-1.dll is missing from your computer..."

Does anyone know of a work-around for this?

What I have tried:

I did some searches and, yes, it is missing. This is a W7 box and it's not on this one and it's not on my W10 box either. The really annoying thing about this is I used dumpbin to list the imports of the program and it says it is importing that DLL for the functions GetFileVersionInfoW and GetFileVersionInfoSizeW but according to the documentation it uses "api-ms-win-core-version-l1-1-0.dll" and that does exist on both machines.

An update for this - the program will work on the W10 box now BUT I can't find that DLL on the machine anywhere - the l1-1-1.dll file I mean. I searched the registry and I find no mention of it anywhere.

This brings up another question - how can the loader utilize a DLL that is nowhere to be found on this machine? It seems we have gone from DLL hell to DLL sorcery.

Another update : I think I see what is going on now. The DLL file that exists (api-ms-win-core-version-l1-1-0.dll) exports all four of the Version functions. Incidentally, only the wide character versions, and the MBCS versions are nowhere to be found. I think what is happening is the loader finds the functions in question in the ...l1-1-0.dll so it links with them and ignores the fact that ...l1-1-1.dll is not present. Now, it seems this is how it works on W10 but it is NOT working like this in W7. I think the root of the problem is there is a bug in whatever specifies the DLL for those functions in the file mincore.lib. I would guess it is a .DEF file but I don't know.

推荐答案

有时不同的Windows版本很棘手。两者都处于实际更新级别和相同的味道吗?有趣的是在stackoverflow回答。据我所知,W7上的l1-1-1dll不可用。不确定。



尝试修复组件存储
Sometimes different windows version are tricky. Are both at actual update levels and same "flavor"? Interesting is also an answer at stackoverflow. I understand it so, that the "l1-1-1" dll isnt available on W7. Not sure about it.

Try to fix component store as described in that article.


这篇关于使用getfileversioninfo和verqueryvalue的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆