Skip to content

NativeInt type for the Count parameter of the ReadBuffer, WriteBuffer methods of the TStream class

The TStream.ReadBuffer and TStream.WriteBuffer methods have changed the Count parameter type to NativeInt.
Changed the implementation of ReadBuffer, WriteBuffer so that the size of the blocks when calling Read and Write does not exceed High(Longint).

Notes:

  • Thanks to this change, for example, a file larger than 2GB can be loaded into TMemoryStream.
  • The fact that the Count parameter has the NativeInt type is compatible with the latest versions of Delphi.

Closes #39540 (closed)

Merge request reports