Version Information Component (32 bit)
Information Sheet

Contents

» Contents

Description

TPJVersionInfo is a 32 bit non-visual component for all Win32 versions of Delphi and C++Builder that encapsulates the version information contained in an executable file's resources.

The component reads information from a designated file's VERSIONINFO resource. The required file is specified in the component's FileName property. Setting FileName to the empty string fetches version information for the executable containing the component. The boolean HaveInfo property indicates whether the file contains version information. This component can access variable file information for each language provided in the resource.

Run-time properties enable access to to version information. Properties enable:

Limitations

The component makes calls to the Windows API. Therefore the version information being read must follow the Microsoft guidelines - be warned that not all software complies!

Further information

For detailed information about version information refer to the Win32 SDK.

» Contents

Compatibility

Delphi compatibility

TPJVersionInfo compiles on all Win32 versions and personalities of Delphi. It has been tested with Delphi versions 2, 3, 4, 6, 7 and 2006 (Win32 personality). It is assumed to work correctly with Delphis 5 and 2005.

Compatibility with previous versions

The unit name changed to PJVersionInfo at release 3 - this means that programs using earlier versions will need to be modified (or to have an alias set in Delphi's Project Options) before being recompiled using the new version. Functionally, the component is backward compatible with earlier versions.

Help system compatibility

The help file is not compatible with the Delphi 2, 2005 or 2006 IDEs, although it can be used separately.

» Contents

Installation

In these instructions $(DELPHI) is to be taken to represent the path where the appropriate version of Delphi was installed. Similarly $(BDS) refers to the installation path of a version of the Borland Developement System.

Note that the help file included in the download can only integrate with the IDE in Delphi 3-7.

Important Note: If you are updating from an earlier version of this component and have installed the DelphiDabbler About Box Component (TPJAboutBoxDlg) you may need to uninstall it before updating this component, and re-install the about box component once the update has been installed. If the About Box Component is earlier that v3.2 it will need to be updated to the most recent version.

The installation method differs depending on the version of Delphi. Therefore the instructions are divided as follows:

Installation with Delphi 2005 & 2006

  1. Unzip the downloaded zip file into a folder, preserving the directory structure.
  2. Copy PJVersionInfo.pas and PJVersionInfo.dcr to where you wish to install into Delphi. This will probably be a sub-folder of $(BDS)\lib.
  3. To install the component it must be included in a design package. You can either create a new design package or add the component to an existing one. These instructions assume you will be installing into an existing package.
  4. If you wish you can now delete PJVersionInfo.pas from the place where you copied it.
  5. The supplied demo programs can be loaded into the IDE and compiled and run as required.

Installation with Delphi 3 to 7

  1. Unzip the downloaded zip file into a folder, preserving the directory structure.
  2. Copy PJVersionInfo.pas and PJVersionInfo.dcr to where you wish to install into Delphi. This will probably be a sub-folder of $(DELPHI)\lib.
  3. To install the component it must be included in a design package. You can either create a new design package or add the component to an existing one. These instructions assume you will be installing into an existing package.
  4. If you wish you can now delete PJVersionInfo.pas from the place where you copied it.
  5. The simplest way to install the help file is to use my Component Help Installer Expert. The download includes an .als a-link keyword file for use with Delphi 6 and 7. Component Help Installer v2.2 or later can also install the keyword file for you. If you prefer to install manually, this article explains the process.
  6. The supplied demo programs can be loaded into Delphi and compiled and run as required. Please note: the demo programs do not compile and run correctly under Delphi 3.

Installation with Delphi 2

  1. Unzip the downloaded zip file into a folder, preserving the directory structure.
  2. Copy PJVersionInfo.pas and PJVersionInfo.dcr to where you wish to install into Delphi. This will probably be a sub-folder of $(DELPHI)\lib.
  3. Install into Delphi as follows:
  4. If you wish you can now delete PJVersionInfo.pas from the place where you copied it.
  5. Please note: the demo programs do not compile and run correctly under Delphi 2.

» Contents

Demo Projects

The source code for two demo projects is included. The demos are:

  1. VIDemo.dpr is an application that can extract and display version information from any program (provided that the program has valid version information).
  2. HelpEgs.dpr implements all the examples from the component help file.

» Contents

Update History

A complete change log is provided in a text file that is included in the download.

» Contents

License and Disclaimer

This source code is subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this program except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/.

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The Original Code is Version Information Component.

The Initial Developer of the Original Code is Peter Johnson (http://www.delphidabbler.com/).

Portions created by the Initial Developer are Copyright © 1998-2005 Peter Johnson. All Rights Reserved.

Contributor(s):

Roland Beduerftig (C++ builder compatibility)

All relevant trademarks are acknowledged.

» Contents

About the Author

I'm Peter Johnson - a hobbyist programmer living in Ceredigion in West Wales, UK, writing write mainly in Delphi. My programs are available for download from: http://www.delphidabbler.com/.

I can be contacted via the website.

Please let me know if you have any comments about the components, if you have found a bug, or you want to suggest any updates.