Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting EXE/DLL version info
Message
De
10/04/2001 18:36:44
Jonathan Cochran
Alion Science and Technology
Maryland, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00494206
Message ID:
00494207
Vues:
14
How about:
= AGETFILEVERSION( la_FileVersion, 'N:\LIMS\lims.exe' )
cVersion = la_FileVersion[ 4 ]
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform