FunctionPackage: windowsToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
This page is new in 8.2.

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-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page is new in the 8.2 release.
Created 2016.6.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
This page is new in 8.2.