[Overview][Resource strings][Constants][Types][Classes][Index] Reference for unit 'resource' (#fcl-res)

TAbstractResourceReader.CheckMagic

Checks whether a stream is in a format the reader recognizes

Declaration

Source position: resource.pp line 296

protected function TAbstractResourceReader.CheckMagic(

  aStream: TStream

):Boolean; virtual; abstract;

Arguments

aStream

  

The stream to check

Function result

true if the format of the stream is recognized

Description

A TResources object invokes this method when it is searching for a reader able to read a stream, passing that stream as the aStream parameter.

aStream position is already correctly set: the reader must start to read from there.

This method should read the minimum amount of information needed to recognize the contents of a stream as a valid format: it usually means reading a magic number or a file header.

See also

TAbstractResourceReader.Load

  

Loads resources from a stream

TResources.FindReader

  

Searches for a suitable resource reader

TResources.LoadFromStream

  

Loads the contents of the object from a stream

TResources.LoadFromFile

  

Loads the contents of the object from a file


Documentation generated on: Jun 23 2021