Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-03

TStream ReadComponent

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Leonardo M. Ramé

Hi, I'm trying to read a file stream created using TMemoryStream's WriteComponent method with a Delphi 7 program. To read the component I use TMemoryStream's ReadComponent method.

When I read use ReadCompoent, a EReadError is raised. Does anyone tried this?. The same program works perfectly in Delphi.

Leonardo.

Reply by email

Michael Van Canneyt
to Leonardo M. Ramé
Leonardo M. Ramé wrote
Hi, I'm trying to read a file stream created using TMemoryStream's WriteComponent method with a Delphi 7 program. To read the component I use TMemoryStream's ReadComponent method. When I read use ReadCompoent, a EReadError is raised. Does anyone tried this?. The same program works perfectly in Delphi.

It's not guaranteed that the streams created by Delphi 7 and FPC are binary equivalent. The best you can do in such a case is to create a text stream in delphi, FPC should be able to convert and read that.

Michael.

Reply by email