Control Name | Unit | Class |
Version Information | VerInfo | TVersionInfo |
Description:
This manipulates the
information from the Microsoft Version Resource (VERSIONINFO)
structure. Whenever the FileName property is changed, the class properties are
updated. The read-only Valid property determines whether a
version resource loaded successfully and information is valid.
For more information about version resources, see your Windows
API reference.
Property Comments
Declaration: Comments: string;
This contains the string specifying the comments..
Property CompanyName
Declaration: CompanyName: string;
This contains the string specifying the company that produced the file.
Property FileDescription
Declaration: FileDescription: string;
This contains the string specifying the file description of the file. This string may be displayed in a list box when the user is choosing files to install.
Property FileName
Declaration: FileName: string;
This contains the string specifying the FileName property where to search for Version Resource information. When the filename changes, the class looks for new version information and updates the class properties.
Property FileVersion
Declaration: FileVersion: string;
This contains the string specifying the version number of the file--for example, "3.10" or "5.00.RC2". For more information about version, see the Windows API reference.
Property FixedFileInfo
Declaration: FixedFileInfo: PVSFixedFileInfo;
This data structure contains a VSFixedFileInfo structure that specifies arbitrary data associated with this structure:
TVSFixedFileInfo
= record
__dwSignature: Longint;
__dwStrucVersion: Longint;
__dwFileVersionMS: Longint;
__dwFileVersionLS: Longint;
__dwProductVersionMS: Longint;
__dwProductVersionLS: Longint;
__dwFileFlagsMask: Longint;
__dwFileFlags: Longint;
__dwFileOS: Longint;
__dwFileType: Longint;
__dwFileSubtype: Longint;
__dwFileDateMS: Longint;
__dwFileDateLS: Longint;
end;
Property InternalName
Declaration: InternalName: string;
This contains the string
specifying the internal name of the file, (if exists)
For example, a module name if the file is a dynamic-link library.
If the file has no internal name, this string should be the
original filename, without extension.
Property LegalCopyright
Declaration: LegalCopyright: string;
This contains the string specifying copyright notices that apply to the file. This should (or would) include the full text of all notices, legal symbols, copyright dates, and so on.
Property LegalTrademarks
Declaration: LegalTrademarks: string;
This contains the string specifying all trademarks and registered trademarks that apply to the file. This should include the full text of all notices, legal symbols, trademark numbers, and so on.
Property OriginalFilename
Declaration: OriginalFilename: string;
This contains the string specifying the original name of the file (do not including the path!). This information enables an application to determine whether a file has been renamed by a user. The format of the name depends on the file system for which the file was created.
Property PrivateBuild
Declaration: PrivateBuild: string;
This contains the string specifying information about a private version of the file--for example, "Built by TESTER1 on \TESTBED". This string should be present only if the VS_FF_PRIVATEBUILD flag is set in the dwFileFlags member of the FixedFileInfo property (VS_FIXEDFILEINFO structure) of the version resource.
Property ProductName
Declaration: ProductName: string;
This contains the string specifying the name of the product with which the file is distributed.
Property ProductVersion
Declaration: ProductVersion: string;
This contains the string specifying the version of the product with which the file is distributed--for example, "3.10" or "5.00.RC2". For more information about version, see the Windows API reference.
Property SpecialBuild
Declaration: SpecialBuild: string;
This contains the string specifying how this version of the file differs from the standard version--for example, "Private build for TESTER1 solving mouse problems on M250 and M250E computers". This string should be present only if the VS_FF_SPECIALBUILD flag is set in the dwFileFlags member of the FixedFileInfo property (VS_FIXEDFILEINFO structure) of the version resource.
Property Translation
Declaration: Translation: Pointer;
This contains the string specifying the translation table in the variable information structure. This property retrieves a pointer to an array of language and character-set identifiers.
Property Valid
Declaration: Valid: Boolean;
The read-only Valid property determines whether a version resource loaded successfully and information is valid. You can check this property after creation a resource object and after the FileName property has been changed.
Property VersionCharSet
Declaration: VersionCharSet: TVersionCharSet;
Specifies one of the character-set identifiers.
Property VersionLanguage
Declaration: VersionLanguage: TVersionLanguage;
Specifies one of the language identifiers.
Property VersionNum
Declaration: VersionNum: Longint;
Specifies the binary version number for the file.
Method Create
Declaration: constructor Create(const AFileName:
string);
The Create method allocates memory to create a TVersionInfo object, passes it the file name of the interesting file and read version information about a specified file from VERSIONINFO resource. If the reading succeeds, the Valid property is True. If the reading fails, the Valid property is False.
Method GetVerValue
Declaration: function GetVerValue(const VerName:
string): string;
The GetVerValue function returns selected version information from the specified version-information resource.
Type TVersionCharSet
Declaration: TVersionCharSet = (vcsASCII, vcsJapan,
vcsKorea, vcsTaiwan, vcsUnicode, vcsEasternEuropean, vcsCyrillic,
vcsMultilingual, vcsGreek, vcsTurkish, vcsHebrew, vcsArabic,
vcsUnknown);
TVersionCharSet is a set of values for the VersionCharSet property of the TVersionInfo class.
Type TVersionLanguage
Declaration: TVersionLanguage = (vlArabic, ...,
vlUnknown);
TVersionLanguage is a set of values for the VersionLanguage property of the TVersionInfo class.
Routine OkToWriteModule
Declaration: function OkToWriteModule(ModuleName:
string; NewVer: Longint): Boolean;
Return True if it's ok to overwrite ModuleName with NewVer.
OkToWriteModule example:
if
OkToWriteModule('C:\WINDOWS\MYLIB.DLL', NewVerNum) then
{ write file to disk }
Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000