[fpc-pascal] Pipe vs Memory buffer.

greim greim at schleibinger.com
Thu Jan 26 13:02:08 CET 2017


Hello Fred,

I didn't understand the software structure / problem behind the C-> 
Pascal translation, but for me named pipes work very well for many kinds 
of interprocess communication.

Markus





Am 25.01.2017 um 23:13 schrieb fredvs:
> Hello
>
> In a C method:
>
> OP_WARN_UNUSED_RESULT OggOpusFile *op_test_memory(const unsigned char
> *_data,
>  size_t _size,int *_error);
>
> translated in Pascal with this:
>
> var
>  op_test_memory: function(const _data; const size: cuint; out error: cint):
> TOggOpusFile;
>
> How to use a pipe for _data ?
>
> The pipe is a TInputPipeStream.
>
> Using this does not work:
> pipein was created and linked to a url.
>
> var
> pipein :TInputPipeStream; /
> PipeBufferSize := $4000;
> ...
> op_test_memory(pointer(InPipe),PipeBufferSize, Err);
>
> The error is -129 which is a null pointer or other generic internal error.
>
> Thanks.
>
> Fre;D
>
>
>
>
> -----
> Many thanks ;-)
> --
> View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Pipe-vs-Memory-buffer-tp5727435.html
> Sent from the Free Pascal - General mailing list archive at Nabble.com.
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>




More information about the fpc-pascal mailing list