🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #10813

Re: Same memory piece for 2 running applications?

#10813
From: Steve Aletto
Date: Wed, 17 Mar 2004 07:50
19 lines
1785 bytes
> I need to write 2 applications which runs at the same time on the
> computer (Windows-2000) and share same piece of memory for
> exchanging data between each other (this piece of memory will
> contain a matrix of 400 x 500 float numbers (or 'int' , i still
> don't know) so if for example one application change this matrix,
> the anther application can take the matrix from the memory and
> use it, or display it for example...
>
> How do i do that? how can i allocate same piece of memory the two
> different applications can access and use (each one in it's turn)
> ??

You could use 'File mapping' technology. Start from CreateFileMapping
and related functions. To synchronize the processes you could simply
use a critical section, but there are many other ways.

HTH,

Steve.
Technical Details
Message-ID: <405803a6@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4057f989$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,e8102036f7e0120d
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-03-17 00:09:42 PST
Reply-To: "Steve Aletto" <steve_alettoANTI@SPAMhotmail.com>
From: "Steve Aletto" <steve_alettoANTI@SPAMhotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4057f989$1@newsgroups.borland.com>
Subject: Re: Same memory piece for 2 running applications?
Date: Wed, 17 Mar 2004 08:50:43 +0100
Lines: 21
Organization: Steve Aletto
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 80.105.101.132
Message-ID: <405803a6@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1079509926 80.105.101.132 (16 Mar 2004 23:52:06 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail