我正在使用 VerQueryValue 从 a 检索字符串DLL 的版本信息。
一切正常,除了资源管理器显示的文件版本(右键单击文件,属性,详细信息,“文件版本”)与我从 VerQueryValue 获取的字符串不匹配。
我对 VerQueryValue 的所有其他调用都工作正常,但 FileVersion 似乎检索与 ProductVersion 相同的数据。 我尝试过用不同语言(C++ 和 Delphi)编写的两个不同的“版本信息”组件,并且都表现出这种行为,所以我不认为这是我(或他们的)代码中的错误。
我能想到两种可能性:
- VerQueryValue 中的错误
- ,或者 Windows shell 实际上显示了 FileVersion 字符串以外的其他内容。
有人知道它可能是什么吗?
I'm using the VerQueryValue to retrieve strings from a DLL's VersionInfo.
All works fine, except that the FileVersion displayed by Explorer (right-click on file, Properties, Details, "File Version") doesn't match the string I get from the VerQueryValue.
All my other calls to VerQueryValue are working fine, but FileVersion seems to retrieve the same data as ProductVersion. I've tried two different "version info" components written in different languages ( C++ and Delphi), and both exhibit this behaviour, so I don't think it's a bug in my (or their) code.
Two possibilities I can think of:
- A bug in VerQueryValue
- or, the Windows shell actually displays something other than the FileVersion string.
Anybody know which it's likely to be?
发布评论
评论(2)
VerQueryValue 的 lpSubBlock 参数(第二个参数)是否设置为您所在区域设置的正确值? 对于英语 - 英国,这将是:
此页面有更多的语言/字符集标识符。
Is the lpSubBlock parameter (the 2nd parameter) of VerQueryValue set to the correct value for the locale you're in? For English - United Kingdom this would be:
This page has some more language/character-set identifiers.
读这个
KB160042,我想您会找到答案。
Read this
KB160042, i think you will find your answer.