Click or drag to resize

Functions.AGetFileVersion Method

-- todo --
Creates an array containing information about files with Windows version resources such as .exe, .dll, and .fll files, or automation servers created in X#. For a X# automation server to have Windows version resources, you must specify a value for at least one item in the EXE Version dialog box. For more information, see EXE Version Dialog Box.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.18
 FUNCTION AGetFileVersion(
Request Example View Source


ArrayName (Optional)
Type: Usual
Specifies the name of the array in which the file information is placed. If the array you specify doesn't exist, X# automatically creates the array. If the array exists and isn't large enough to contain the file information, X# automatically increases the size of the array. If the array is larger than necessary, X# truncates the array.
cFileName (Optional)
Type: Usual
Specifies the name, and optionally the path, of the target file.

Return Value

Type: Usual
Numeric. AGetfileversion( ) returns the number of elements in the array. If the file you specify does not exist or does not contain Windows version resources, AGetfileversion( ) returns zero, and the array, if already created, remains unchanged.
The table below lists the contents of each element of the array. For example, you can use the following code to determine the Locale ID for the X# executable file:
1DIMENSION aFiles[1]
3? EVAL("0x"+LEFT(aFiles[15],4))
4** Returns 1033 for US version
element of the arraycontents
2Company Name
3File Description
4File Version
5Internal Name
6Legal Copyright
7Legal Trademarks
8Original File Name
9Private Build
10Product Name
11 Product Version The format of this value is dependent on the version of X#. For details, see VERSION( ) Function.
12Special Build
13OLE Self Registration (contains "OLESelfRegister" if the file supports self-registration; otherwise contains the empty string)
14Language (derived from the Translation Code)
AGetfileversion( ) can be abbreviated to a minimum number of 5 characters.
See Also