RAD Studio VCL Reference
THandleStream.SetSize Method (Int64)

Sets the end of file marker to truncate the resource at the indicated position.

procedure SetSize(NewSize: Longint); override;
procedure SetSize(const NewSize: Int64); override;
virtual __fastcall SetSize(Longint NewSize);
virtual __fastcall SetSize(const Int64 NewSize);

Call SetSize to set the size of the resource. SetSize calls Seek to go to the indicated position, and then writes an end of file marker. If the size of the resource can not be changed, an exception is raised. For example, calling SetSize for a file handle that was opened in fmOpenRead mode will raise an exception. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!