From mboxrd@z Thu Jan 1 00:00:00 1970 Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!news.gegeweb.eu!gegeweb.org!pasdenom.info!.POSTED.2a01:e0a:472:70f0:9dc:978a:d921:8ff3!not-for-mail From: DrPi <314@drpi.fr> Newsgroups: comp.lang.ada Subject: Re: In memory Stream Date: Sat, 17 Feb 2024 14:36:46 +0100 Organization: Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sat, 17 Feb 2024 13:36:47 -0000 (UTC) Injection-Info: rasp.pasdenom.info; posting-account="314@usenet"; posting-host="2a01:e0a:472:70f0:9dc:978a:d921:8ff3"; logging-data="25465"; mail-complaints-to="abuse@pasdenom.info" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:AHZgH+sccB08RseFkS7ERvN67EY= sha256:rhqpQlCKZvLdGWoofus8Nd9zdD+cM6DbpDpGTZPOCKc= sha1:LQv2dbrXyz7l+ciJrVNcS8SBLeM= sha256:aW/0yqGPtovVVV3zJz22hn5Q2b7BubvCnnpnwHW9KD8= Content-Language: fr, en-US In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:66073 List-Id: Le 16/02/2024 à 10:41, DrPi a écrit : > I want to transfert some data between applications through a memory buffer. > The buffer transfert between applications is under control. > My problem is with the buffer content. > I though I'll use a Stream writing/reading in/from the memory buffer. > How can I achieve this ? I've found no example doing this. > Note : I use Ada 2012. Thanks all for your answers. Concerning the OS and the buffer transfert mechanism, as I said, this is under control. I use Windows and the WM_COPYDATA message. My usage is a bit special. The writing process writes a bunch of data in a memory buffer then requests this buffer to be transferred to another process by way of WM_COPYDATA. The receiving process reads the data from the "new" memory buffer. I say "new" since the address is different from the one used in the writing process (of course it can not be the same). The library Jean-Pierre pointed me to perfectly matches this usage. Light and easy to use. Thanks. One enhancement I see is to manage the buffer size to avoid buffer overflow (or did I missed something ?). Thanks again to everybody. Nicolas