All Things Ubuntu Library Wiki
Ubuntu dedicated Object Pascal libraries
Brought to you by:
krisjacewicz
A class for reading VS_VERSION_INFO record directly from an executable file.
Declaration
Unit: [atuLazVersionInfo] (see trunk version)
TEmbeddedVersionInfo
= Class
Public
Constructor Create(AFilename: string);
Destructor Destroy; override;
//METHODS:
Function LoadFromFile(const AFilename: string): Boolean;
//PROPERTIES:
Property Version[Index: byte]: word;
Property VersionMajorNumber: word;
Property VersionMinorNumber: word;
Property VersionReleaseNumber: word;
Property VersionBuildNumber: word;
Property VersionInfoOffset: longint;
Property KeyCount: integer;
Property Keys[const Index: integer]: string;
Property Values[const Key: string]: string;
Property ValueByIndex[const Index: integer]: string;
Property HasVersionInfo: Boolean;
Property Comments: string read;;
Property CompanyName: string;
Property FileDescription: string;
Property FileVersion: string;
Property InternalName: string;
Property LegalCopyright: string;
Property LegalTrademarks: string;
Property OriginalFilename: string;
Property ProductName: string;
Property ProductVersion: string;
End;
Methods:
Function LoadFromFile(const AFilename: string): Boolean;
HasVersionInfo
property to confirm that VERSION_INFO was indeed extracted.Properties:
Property Version[Index: byte]: word;
You can access portions of FileVersion value as word values. The portions are indexed from 0 to 3, and correspond to: mjor.minor.release.build fragments.
Property VersionMajorNumber: word;
Direct access to the major number of the version
Property VersionMinorNumber: word;
Property VersionReleaseNumber: word;
Property VersionBuildNumber: word;
Property VersionInfoOffset: longint;
Property KeyCount: integer;
Property Keys[const Index: integer]: string;
Property Values[const Key: string]: string;
Property ValueByIndex[const Index: integer]: string;
Property HasVersionInfo: Boolean;
Property Comments: string;
Property CompanyName: string;
Property FileDescription: string;
Property FileVersion: string;
Property InternalName: string;
Property LegalCopyright: string;
Property LegalTrademarks: string;
Property OriginalFilename: string;
Property ProductName: string;
Property ProductVersion: string;