Article ID: 113892
Article Last Modified on 3/3/2005
GetFileVersionInfoSize("user.exe"...);
GetFileVersionInfo("user.exe"...);
VerQueryValue(...);
For a complete sample application that does this, please see the sample in
the ..\SAMPLES\VERSTAMP directory from Microsoft Visual C++.
Declare Function GetFileVersionInfo% Lib "ver.dll"
(ByVal lpszFileName$, ByVal handle As Any, ByVal
cbBuf&, ByVal lpvData$)
Dim pos As Integer
Dim version As String * 255
Dim ans As String
' get the version info and fill the version string
ret% = GetFileVersionInfo("user.exe", 0&, 254, version)
' find the position in the string where the FileVersion stamp is.
pos = InStr(1, version, "FileVersion")
' 12 = lengh of "FileVersion" +1 for the null
' 4 = length of string to return i.e. "3.11"
ans = Mid$(version, pos + 12, 4)
' display answer
MsgBox ans
Additional query words: 3.00 3.10
Keywords: kb16bitonly kbresource kbsyssettings kbprb KB113892