[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'Classes' (#rtl)

TStream.ReadComponent

Reads component data from a stream

Declaration

Source position: classesh.inc line 600

public function TStream.ReadComponent(

  Instance: TComponent

):TComponent;

Description

ReadComponentreads a component state from the stream and transfers this state to Instance. If Instanceis nil, then it is created first based on the type stored in the stream. ReadComponentreturns the component as it is read from the stream.

ReadComponentsimply creates a TReaderobject and calls its ReadRootComponentmethod.

Errors

If an error occurs during the reading of the component, an EFilerErrorexception is raised.

See also

TStream.WriteComponent

  

Write component data to the stream

TStream.ReadComponentRes

  

Reads component data and resource header from a stream

TReader.ReadRootComponent

  

Starts reading a root component.