Welcome to the new DelphiDabbler Code Library Documentation.

This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.

Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.

TPJVersionInfo class

Project: Version Information Component

Unit: PJVersionInfo

Applies to: ~>3.0

Description

This class defines a non-visual component that exposes version resource information contained in an executable file.

The component reads information from the file’s VERSIONINFO resource. If the file has no such resource then the component returns no information. Use the HaveInfo property to find whether the component has been able to get version information from the file.

The file from which resource information is gleaned is determined by the FileName property. This is the only design-time property added by this component. Other properties are available at run time only and are used to manipulate and read the version information.

The component supports multi-lingual version resources which have different sets of string information for each language. Use the NumTranslations and CurrentTranslation properties to select the required translation.

Methods

TPJVersionInfo defines no methods.

Properties

TPJVersionInfo defines the following properties in addition to those inherited from TComponent.

Property Description
CharSet Returns a description of the character set for the current translation.
CharSetCode Returns the code of the character set used by the current translation.
Comments Returns the ‘Comments’ string file information string. This property is an alias for StringFileInfo['Comments'].
CompanyName Returns the ‘CompanyName’ string file information string. This property is an alias for StringFileInfo['CompanyName'].
CurrentTranslation Get or set the translation to be used by string information, language and character set properties.
FileDescription Returns the ‘FileDescription’ string file information string. This property is an alias for StringFileInfo['FileDescription'].
FileFlags Provides information about the release attributes of a file.
FileFlagsMask Determines which bits of the FileFlags property are valid.
FileName Specifies the file from which version information is to be read.
FileOS Provides information about the operating system for which the application was designed.
FileSubType Provides additional file type information for certain file types.
FileType Provides information about the type of file: e.g. application, DLL etc.
FileVersion Returns the ‘FileVersion’ string file information string. This property is an alias for StringFileInfo['FileVersion'].
FileVersionNumber Gets the version number of a file as a TPJVersionNumber record.
FixedFileInfo Provides access to the fixed file information record from the current file via a Windows TVSFixedFileInfo record.
HaveInfo Informs if the current file contains version information.
InternalName Returns the ‘InternalName’ string file information string. This property is an alias for StringFileInfo['InternalName'].
Language Returns a description of the language used for the current translation.
LanguageCode Returns the language code associated with the current translation.
LegalCopyright Returns the ‘LegalCopyright’ string file information string. This property is an alias for StringFileInfo['LegalCopyright'].
LegalTrademarks Returns the ‘LegalTrademarks’ string file information string. This property is an alias for StringFileInfo['LegalTrademarks'].
NumTranslations Gets the number of translations in a file’s version information.
OriginalFileName Returns the ‘OriginalFileName’ string file information string. This property is an alias for StringFileInfo['OriginalFileName'].
PrivateBuild Returns the ‘PrivateBuild’ string file information string. This property is an alias for StringFileInfo['PrivateBuild'].
ProductName Returns the ‘ProductName’ string file information string. This property is an alias for StringFileInfo['ProductName'].
ProductVersion Returns the ‘ProductVersion’ string file information string. This property is an alias for StringFileInfo['ProductVersion'].
ProductVersionNumber Gets the version number of the product to which a file relates as a TPJVersionNumber record.
SpecialBuild Returns the ‘SpecialBuild’ string file information string. This property is an alias for StringFileInfo['SpecialBuild'].
StringFileInfo String indexed array property that returns the value of string information with the given name.

Events

TPJVersionInfo defines no new events.