RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
THandleStream.Read Method

Reads up to Count bytes of data from the resource associated with the handle stream into Buffer.

Pascal
function Read(var Buffer; Count: Longint): Longint; override;
C++
virtual __fastcall Longint Read( Buffer, Longint Count);

Use Read to read data from the resource associated with the handle stream when the number of bytes in the file is not known. Read transfers up to Count bytes from the resource, starting at the current position, and then advances the current position in the resource by the number of bytes actually transferred. Read returns the number of bytes actually transferred, which may be less than Count if the end of file marker is encountered. 

All other data-reading methods of a handle stream (ReadBuffer, ReadComponent) call Read to do the actual reading. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!