It seems that the compiler picks the wrong overload of TStream.Read. You can work around this by using CopyFrom instead:If FPC 3.2.2 TStream does not have overloaded Read, Write functions, in which the parameter has the type TBytes.
It seems that the compiler picks the wrong overload of TStream.Read. You can work around this by using CopyFrom instead:If FPC 3.2.2 TStream does not have overloaded Read, Write functions, in which the parameter has the type TBytes.
Therefore, need to use Read(buffer[0],...) instead of Read(buffer,...). The same with Write.