TResResourceReader.Load procedure
Declaration
procedure Load(aResources: TResources; aStream: TStream); overrideDescription
Not described here; this is what TAbstractResourceReader.Load says of it:
Loads resources from a stream
A TResources object invokes this method when it needs to be loaded from a stream, passing itself as the aResources parameter and the stream as the aStream parameter.
aStream position is already correctly set: the reader must start to read from there.
Descendant classes must ensure that the the stream is in a format they recognize, otherwise an EResourceReaderWrongFormatException exception must be raised.
Each resource is then created, read from the stream and added to the TResources object.
When reading a resource, a reader must:
- Create the resource via TResourceFactory.CreateResource class method with the correct type and name.
-
Set at least the following resource properties:
- DataSize, via SetDataSize method.
- DataOffset, via SetDataSize method. This is the offset of the resource data from the beginning of the stream.
- RawData. The reader must create a TResourceDataStream object and assign it to the resource via SetRawData method.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
