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.
Project: Resource File Unit
Applies to: ~>1.0
This class is used to encapsulate a 32 bit resource file, to find which resources it contains, to add new resources and to delete existing ones.
Create new, empty instances of TPJResourceFile by calling its parameterless Create constructor.
Resource entries accessed or created via this class are TPJResourceEntry objects and have methods and properties that can be used to interrogate and update them. These objects are not created directly but are created by loading a resource file or by calling methods of TPJResourceFile.
Freeing a TPJResourceFile instance also frees all the associated TPJResourceEntry objects, so do not keep references to these objects after the parent TPJResourceFile object has been freed.
When compiled with Delphi 2005 and later all the resource entries in a TPJResourceFile instance can be enumerated within a for..in loop.
Note: Although we use the term “resource file” in this documentation, the term also relates to binary resource data stored in a stream.
|Overloaded methods that add a new, empty, resource to the object.
|Clears all resource entries from the resource file.
|Deletes a given resource entry object from the resource file.
|Checks if a resource with a given type, name and language ID exists.
|Finds a resource by type, name and language ID.
|Finds the index of a resource in the Entries property by type, name and language ID.
|Returns an object that can enumerate all the resource entries in a resource file.
|Gets the index of a resource entry in the Entries property.
|Class function that checks if a stream contains a valid 32 bit resource file.
|Loads data from a resource file.
|Loads resource data from a stream.
|Saves resource data to a file.
|Saves resource data to a stream.
|Number of resources (entries) in the resource file.
|Indexed access to all resources in the resource file.