INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Tips -N- Tricks

How do I retrieve my app's version number? by foxdev
Posted: 28 Sep 00

Visual FoxPro 6 contains the function aGetFileVersion which can retrieve version and other information from VFP and non-VFP Windows EXEs and DLLs.

For Visual FoxPro version 5, you can obtain this information on the currently-running VFP-created EXE by using the GetFileVersion() function in FOXTOOLS.FLL.  The code follows:


* -- uses GetFileVersion function in FoxTools.FLL (VFP version 5)
* -- returns info on currently-running VFP EXE
* --    supplied when the EXE was built
* --    (version, company info, description, etc.)
* -- optional parameter - pass .T. to get full info, .F. or nothing to get just version

lparameter tlreturnfulldescription

local afileinfo   && array to hold file information
local lgoodinfo   && good getfileversion() flag
local cretval       && return value

dimension afileinfo[12,1]

if not "foxtools" $ lower(set("library"))
   set library to foxtools.fll additive
endif

lgoodinfo = getfileversion(sys(16,1), @afileinfo) >= 0
if lgoodinfo        && GetFileVersion performed OK
   if tlreturnfulldescription   && give full info
      cretval = afileinfo(10,1) + " " + ;
         afileinfo(4,1) + " " + ;
         afileinfo(3,1) + " " + ;
         afileinfo(1,1) + " " + ;
         chr(169) + afileinfo(6,1)
   else
      cretval = afileinfo(4,1)   && version only
   endif
else
   cretval = ""
endif

return cretval


Back to Microsoft: Visual FoxPro FAQ Index
Back to Microsoft: Visual FoxPro Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close