0

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?

Roddy
  • 66,617
  • 42
  • 165
  • 277

2 Answers2

1

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__
  • 3,777
  • 1
  • 23
  • 31
-2

Read this KB160042, i think you will find your answer.

fox
  • 1
  • Welcome to SO. Have a look at the [faq](http://stackoverflow.com/faq) to get started. Please don't just dump links. Provide an explanation to what they are pointing and how that content answers the question. – pmr Dec 07 '12 at 17:34