Is there a way to pass a TMemoryStream type in a parameter to HttpServer?

Hi

Using Delphi and RemObjects remoteSDK.
Is there a way to send a TMemoryStream back to client as a result from a remote method execution? Or send it to server as a parameter? I want to send it as a whole (the stream would be closed).

Yes, you can use a Binary parameter to send your Stream

Thanks, I give it a try

I am looking at the examples in order to find the correct type to return with no avail. Do you have the type for “binary”?

Claudio means that you should declare your method with Binary result type:


Edit: See the MegaDemo example. it demonstrates this possibility:

  TMegaDemoService = class(TRORemoteDataModule, IMegaDemoService)
..
    procedure EchoBinary(const BinIN: binary; out BinOUT: Binary);
    function CustomObjectAsStream: Binary;

OK, thanks!