Skip over navigation

Binary Version Information Manipulation Units

Classes to manipulate binary Windows version information.

Version 1.0.0
Released 2023-05-17
Platforms Win32
Framework VCL & FMX
Compatibilty Delphi XE and later

Overview

The Binary Version Information Manipulation Units provide a set of classes that can be used to read, manipulate and write Windows version information in its raw binary form. This is the form used to store version information in Windows executables and resource files.

The advantage of using this code over the Windows API for reading version information is that the code can cope with badly formed version information that would defeat the API routines. Furthermore, this code can enumerate the contents of string tables and list and access non-standard string table entries. It also works with string tables in multiple languages.

Two programs are provided that show how to use classes made available by the vibin project:

  1. ResRWDemo - demonstrates how to read from and write to 32 bit version information resources within binary resource files.
  2. VIReaderDemo - demonstrates how to read 32 bit version information from executable programs or DLLs.

You should the read demo source code alongside the user guide: the two are complementary.

Get The Code

You can download the latest version of the Binary Version Information Manipulation Units directly from SourceForge as dd-vibin-1.0.0.zip.

Download v1.0.0

The Binary Version Information Manipulation Units source code is hosted in the ddablib/vibin GitHub repository. You can git clone or fork the repository as required.

Installation

The Binary Version Information Manipulation Units is supplied in a zip file. Before installing you need to extract all the files from the zip file. The following files will be extracted:

  • DelphiDabbler.Lib.VIBin.Resource.pas – Contains the primary class you need to interact with to manipulate binary version information. This class encapsulates a binary version information resource as stored in Windows binary resource files and executable files.
  • DelphiDabbler.Lib.VIBin.VarRec.pas – Contains support classes required by DelphiDabbler.Lib.VIBin.Resource.pas. These classes encapsulate both 16 bit and 32 bit variable size version information records. They do not need to be accessed directly.
  • DelphiDabbler.Lib.VIBin.Defines.inc – Include file containing defined symbols that enable conditional compilation for different versions of Delphi.
  • README.md – Read-me file.
  • CHANGELOG.md – The project's change log.
  • MPL-2.txt – The Mozilla Public License v2.0.
  • Documentation.URL – Short-cut to the project's online documentation.

In addition to the above files you will find the the source code of two demo projects along with read-me files in the Demos directory.

There are four possible ways to use the units:

  1. The simplest way is to add DelphiDabbler.Lib.VIBin.Resource.pas, DelphiDabbler.Lib.VIBin.VarRec.pas and DelphiDabbler.Lib.VIBin.Defines.pas to your projects.
  2. To make the units and include file easier to re-use you can either copy them to a folder on your Delphi search path, or add the folder where you extracted the units to the search path. You then simply use the units as required without needing to add them to your project.
  3. For maximum portability you can add the units to a Delphi package.
  4. If you use Git you can add the ddablib/vibin GitHub repository as a Git submodule and add it to your project. Obviously, it's safer if you fork the repo and use your own copy, just in case ddablib/vibin ever goes away.

Documentation

Binary Version Information Manipulation Units is comprehensively documented online here

The project's change log can be viewed here.

A read-me file (README.md) is included in the project download or it can be viewed here.

Feedback & Queries

If you find any bugs or want to suggest a new feature please report them using the Binary Version Information Manipulation Units issue tracker.

If you have created a bug fix or have implemented a new feature please open a pull request for it, relative to the develop branch.

Should you have any queries about using the component please read the documentation. If you can't find an answer in the documentation then post a message in the discussion group

License

The Binary Version Information Manipulation Units is open source. It is copyright © 2002-2023 by Peter Johnson. The source code is made available under the terms of the Mozilla Public License v2.0. All relevant trademarks are acknowledged.