PDA

View Full Version : Problems with "VerGetFileVersion"



El_Presidente
10-06-2003, 07:02 AM
Hi everybody,

I'm trying to get the version of a file by using "VerGetFileVersion". Surprisingly the function doesn't return the value which can be seen in the file's properties ("4.5.0.506"). Instead it returns a completely different one ("7.4.262.0") of which I have no idea where it comes from.

Does anybody have similar problems, or can anyone give me a hint how to get the right file version?

Thanks a lot!

Greetz,
El Presidente

dhesog
10-07-2003, 12:29 PM
Please let me know the exact code you are using to retrieve the version of the file. Also, see if there are multiple copies of files installed on the machine. Please note that although file version functions take version information in string format, the version information they reference in a file is the numeric version information. A file's string version information is not inspected or returned by functions.

The version you see in file properties is shown the string version, which may not be equivalent to the file's numeric version information.
For that reason, the value returned in svVersionNumber by VerGetFileVersion may not match the version information displayed by file properties.