Get Version Information

File: ...\Samples\Vfp98\Solution\WINAPI\Getver.scx

This sample allows you to display version information from a .dll or .exe.

A new function called GetFileVersion( ) has been added to Foxtool.fll which allows you to obtain version information on a file. The following code illustrates how you can call the function. See Tools\Foxtools.hlp for details on the specific array elements.

SET LIBRARY TO FoxTools ADDITIVE
DIMENSION aFileVer[12]
nRetVal = GetFileVersion(GetFile("EXE"),@aFileVer) 
IF nRetVal = 0
   DISPLAY MEMO LIKE aFileVer
ENDIF
SET LIBRARY TO

Note   Visual FoxPro now allows you to add File Version information to EXE and DLL files at build time. This version information is stored in a file resource and can be accessed via the Windows Explorer. EXE files created in Visual FoxPro 3.0 will not have a file version resource.