GetFileVersionValue
Previous Top Next


Function GetFileVersionValue(Filename, Value)

This function returns Version information value from a specific DLL, EXE, OCX, etc. This function can be used to determine the internal version number of a DLL or retreive information about the DLL's Copyright owner, or Product name associated with the DLL.

Parameters

Filename
[in] The name of the filename where the version information is to be retrieved

Value
[in] The name of the Value to retreive from the version information section of the specified file
The following values can be retreived from most DLLs:
Comments
InternalName
ProductName
CompanyName
LegalCopyright ProductVersion
FileDescription
LegalTrademarks
PrivateBuild
FileVersion
OriginalFilename
SpecialBuild

Return Value
This function returns a string value. If the requested Filename does not exist or the specified Value cannot be located in the file, the value of "" is returned.

Example:

FileVersion = GetFileVersionValue("c:\windows\system32\kernel32.dll", "FileVersion")

if FileVersion = "1.0.0.0" then
MsgBox "This is Version 1.0!"
End if