My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
TPJResourceEntry  
TPJResourceEntry class description
Updated May 8, 2011 by delphidabbler

TPJResourceEntry

Project: Resource File Unit

Unit: PJResFile.

This class encapsulates a resource within a resource file.

TPJResourceEntry objects are used to manipulate and interrogate resource entries. This is done mainly via properties which give access to resource header information, allow some header information to be set, and give read/write access to the raw resource data via a TStream.

Objects of this class must not be directly instantiated. TPJResourceFile automatically creates the required objects when loading a resource file. New, empty resource entry instances can be created by using one the overloaded AddEntry methods provided by TPJResourceFile. TPJResourceEntry is actually an abstract class that provides an interface for manipulating resource entries. The concrete class that implements the resource entry is private. This enforces the rule that all valid resource objects are created and accessed via TPJResourceFile.

Care should be taken not to use a resource entry after the related resource file object has been cleared or destroyed, or a new resource file has been loaded, since all these actions free previous resource entries. It is safe to free a TPJResourceEntry object directly by calling its Free method. Doing so automatically removes the object from the resource file object it belongs to.

Methods

Method Description
IsMatching Overloaded methods to check if the resource entry matches the type, name and language ID of another entry.

Properties

Property Description
Characteristics Gets or sets the user specified characteristics of the resource as a DWORD.
Data Provides a reference to the TStream object that contains the resource's raw data. The stream can be used to read or write the data. Any padding bytes that follow the resource's data are not included in the stream. The object reference is read only but the stream's contents can be modified.
DataSize The size of the resource data in bytes as a DWORD value. This is the same as calling same as calling Data.Size. Read only.
DataVersion Gets or sets the predefined data resource version information as a DWORD.
HeaderSize The size of the resource header as a DWORD. Read only. Note that the header size varies depending on the type and size of the resource type and name.
LanguageID The language used by the resource as a Word. A value of 0 is language-neutral. Read only.
MemoryFlags Gets or sets the attribute bitmask that specifies the state of resource as a Word.
ResName The name of the resource as a PChar. This value is either a pointer to a zero-terminated string or an ordinal value of the type returned from MakeIntResource. Read only.
ResType The type of the resource as a PChar. This value is either a pointer to a zero-terminated string or an ordinal value of the type returned from MakeIntResource. Read only.
Version Gets or sets the user specified version number of the resource data as a DWORD.


Sign in to add a comment
Powered by Google Project Hosting