FunctionPackage: windowsToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 version

file-version-info

Arguments: file

Returns the file version information (VERSIONINFO) from a file on the Microsoft Windows platform. The can include general attributes of the file such as a description of the file and the name of the company that supplies it, though the Microsoft API refers to this block of information as "file version info". This information appears, for example, on the Version tab of the properties dialog for a file in Microsoft's File Explorer.

file should be the pathname or path namestring of a file. The file is typically an EXE or DLL file.

The return value will be a plist of the version info strings that exist in the file, where the keys are keywords that match the keyword parameters of set-file-version-info (see that function for a list of the file attribute keywords). The value for each of these keys will be a list of the length of the field and the string that's currently in the field (where the current string may be shorter than the field length). The plist will include entries only for the subset of the allowed attributes that are defined in the specified file.

The returned plist will also contain entries for :language-id (an integer), :language-name (a string), and :code-page (an integer). These indicate the language in which the information strings are defined. An exception is that if there is no file version info resource in the file at all, then nil is returned.

Example

(file-version-info "c:/windows/system32/charmap.exe")

A value similar to following is returned.

(:company-name (21 "Microsoft Corporation")
 :file-description (13 "Character Map")
 :file-version (33 "5.1.2600.0 (xpclient.010817-1148)")
 :internal-name (11 "charmap.exe")
 :legal-copyright (45 "© Microsoft Corporation. All rights reserved.")
 :original-filename (11 "charmap.exe")
 :product-name (36 "Microsoft® Windows® Operating System")
 :product-version (10 "5.1.2600.0")
 :language-id 1033
 :language-name "English (United States)"
 :code-page 1200)

The function generate-application takes a file-version-info argument which allows users to specify the VERSIONINFO of the application executable. See Setting the VERSIONINFO of the application executable on Windows in delivery.htm.


Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 version