views:

283

answers:

1

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?

+1  A: 

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:

StringFileInfo\080904E4\FileVersion

This page has some more language/character-set identifiers.

_J_