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.

AddEntry methods

Project: Resource File Unit

Unit: PJResFile.

Class: TPJResourceFile

Applies to: ~>1.0

There are two overloaded AddEntry methods. They are both used to create a new resource entry within the resource file represented by a TPJResourceFile object.


function AddEntry(const ResType, ResName: Pchar;
  const LangID: Word = 0): TPJResourceEntry;

Adds a new, empty, resource to the resource file object.

Parameters:

Returns:

A reference to the new resource entry. This reference should be used to set the resource headers and to store the raw data.

Raises:

An exception is raised if an entry already exists with same type, name and language id.


function AddEntry(const Entry: TPJResourceEntry; const ResName: Pchar;
  const LangID: Word = 0): TPJResourceEntry;

Adds a copy of an existing resource entry to the resource file object with a new resource name and language id. The new entry has the same resource type as the one being copied.

Returns:

A reference to the new resource entry that has the same header information and data as the one being copied except for the resource name and language id.

Raises:

An exception is raised if an entry already exists with same type, name and language id.