Class AFileVersionInfoResource

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type AFileVersionInfoResource = class(AnObject)

Description

This class represents version information that is stored as a resource inside of an object file which represents the main executable of the current process.

You will likely not create a direct instance of this class, as it has no real functionality. It is defined solely to institute a common interface for application version information across platforms and object file types. Instead, you will likely use one of its descendants, such as AnELFFileVersionInfoResource or AWindowsFileVersionInfoResource.

Hierarchy

  • TObject
  • AnObject
  • AFileVersionInfoResource

Overview

Fields

Protected myData: pchar;
Protected myLength: longword;
Protected MyVersionInfo: ADictionary;

Methods

Public function init: boolean; override;
Public destructor destroy; override;
Public function readInto(const ThisDictionary: ADictionary): boolean; virtual; abstract;
Public function data: pointer; virtual;
Public function length: longword; virtual;
Public function VersionInfo: ADictionary; virtual;

Description

Fields

Protected myData: pchar;

Refers to the buffered raw version informaton

Protected myLength: longword;

Stores the size of the raw version information

Protected MyVersionInfo: ADictionary;

Stores the key/value pairs that express version information

Methods

Public function init: boolean; override;

Initializer

Public destructor destroy; override;

Destroy the version info resource.

If AFileVersionInfoResource.data Self.data is not Nil, this method will free the memory to which it refers before calling the inherited routine.

Public function readInto(const ThisDictionary: ADictionary): boolean; virtual; abstract;

Read version information as key/value pairs from the object file, and store them in the specified dictionary.

Descendant classes must implement this method. The method should return True if the operation was succesful and False if it was not.

Public function data: pointer; virtual;

Retrieve a reference to the raw version info data.

The caller should NOT attempt to free the memory to which the reference returned by this routine refers. That will be done automatically when the file version info resource is freed.

Public function length: longword; virtual;

Retrieve the size, in bytes, of the raw version data.

Public function VersionInfo: ADictionary; virtual;

Retrieve a reference to the key/value pairs that express the version information contained in the main executable of the current process.


Generated by PasDoc 0.13.0 on 2015-06-23 19:40:11