Send and receive TStream

Hi,

I’m converting a big old application written in Delphi 7 by stepping in plugins written in Delphi 11.3. The evolution is clearly done without the use of runtime packages and everything works perfectly.

One of the points I’m converting is related to the reporting engine by moving everything into a new plugin. This plugin processes reports and returns a PDF how TMemoryStream. What is the correct way to share a TStream between host (delphi 7) and plugin (Delphi 11.3)?

Thank you very much!

Hi,

You can send TMemoryStream as

procedure SendStream(size: Integer; data: Pointer);
// SendStream(stream.Size, stream.Memory)