Looks like I've spent enough time trying to resolve this to ask the community.
I need a reliable way to determine the file's version and trying to use GetFileVersionInfoSize
+ GetFileVersionInfo
for that. In particular, I use dwFileVersionMS
and dwFileVersionLS
in VS_FIXEDFILEINFO
. And with does work for almost all the files on my hard drive except the ucrtbase.dll
, which resides both in c:\windows\system32
and c:\windows\syswow64
folders. MSDN states that this part of the file version is not redirected, but I get different behavior. That is, Explorer shows "10.0.18362.387", but the fields in structure from the above WinAPI functions returns "6.2.18362.387". Note, both are not localized strings, but binary values from the VS_FIXEDFILEINFO.
When I open the DLL with any binary editor and search for the file version I see that it's correct - 0x00 0x00 0x0A 0x00 0x83 0x01 0xBA 0x47
.
Could anyone explain to me what I'm missing here?