GetFileVersion( )

Microsoft Visual FoxPro Foxtools

GetFileVersion( )

Returns information about a file. Also available as the native function AGETFILEVERSION( ) in Visual FoxPro.

Syntax

GetFileVersion(cFileName, @ArrayName)

cFileName

Specifies the name of the file for which information is returned.

ArrayName

Specifies the name of the array in which the file information is placed. The array must be created before issuing GetFileVersion( ), and must have at least 1 column and 12 rows.

Return Type

Numeric

Remarks

GetFileVersion( ) is typically used to get information about .exe and .dll files.

Zero is returned if the function is successful; otherwise –1 is returned.

The following table lists the file information contained in the twelve array elements:

Element Number File Information
1 Comments
2 Company Name
3 File Description
4 File Version
5 Internal Name
6 Legal Copyright
7 Legal Trademarks
8 Original File Name
9 Private Build
10 Product Name
11 Product Version
12 Special Build