>How about:
>
>
>= AGETFILEVERSION( la_FileVersion, 'N:\LIMS\lims.exe' )
>cVersion = la_FileVersion[ 4 ]
>
>
For VFP5, you'd have to use GETFILEVERSION from FOXTOOLS.FLL.
>>I am trying to obtain the version number of my VFP 5.0 EXE. I've got everything working except the most importand of the three API calls. Here's what I got going so far:
>>
>>
>>DECLARE INTEGER GetFileVersionInfoSize in VERSION.DLL ;
>> String, Integer @
>>DECLARE INTEGER GetFileVersionInfo in VERSION.DLL ;
>> String, Integer, Integer, String @
>>DECLARE INTEGER VerQueryValue in VERSION.DLL ;
>> String, String, String @, Integer @
>>
>>cFileName='N:\LIMS\lims.exe'
>>nJunk=0
>>nFVS=GetFileVersionInfoSize(cFileName,@nJunk)
>>
>>cVersionData=space(nFVS)
>>rv=GetFileVersionInfo(cFileName, nJunk, nFVS, @cVersionData)
>>
>>cVersion=" "
>>nValLen=0
>>rv=VerQueryValue(cVersionData, "\StringFileInfo\040904E4\FileVersion", @cVersion, @ValLen)
>>
>>
>>The nValLen contains the correct length of the return value, but the return value is just junk. I displayed the cVersionData to the screen and could decipher the items in the unicode output. The only thing I can figure is I'm not ueing the correct lang-charset mentioned in the help topic for this function (GetFileVersionInfo). You'll notice I'm just using the example from the help file. Anyone been able to pull this off? Do I need to convert the result of the GetFileVersionInfo function back to a normal string (since it's unicode?).
>>
>>Thanks
>>
>>Steve