🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Same memory piece for 2 running applications?

#9791
From: Hans Galema
Date: Tue, 08 Jun 2004 10:29
24 lines
1660 bytes
Ramy wrote:

> 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 

> Can i allocate an array like this - 
> 
> float array[500][400];

Yes.

> then write it's address ( &array[0][0] ) and size (500x400) in
> a file, so the other application can read the file and access
> the array by using the pointer and the size from this file?

No.

Each application has its own addressspace.

But what you want is possible in a different way. Have a look
in the Win32 help for SharedMemory, FileMapping and CreateFileMapping().

Hans.
Technical Details
Message-ID: <40c594e3$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40c58d7a$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,1b6c238d7724ed66
X-Google-Attributes: gid10cc67,public
Date: Tue, 08 Jun 2004 12:29:37 +0200
From: Hans Galema <dontusethis@dontusethis.nl>
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6b) Gecko/20031208
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Same memory piece for 2 running applications? 
References: <40c58d7a$1@newsgroups.borland.com>
In-Reply-To: <40c58d7a$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 129.125.201.248
Message-ID: <40c594e3$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1086690531 129.125.201.248 (8 Jun 2004 03:28:51 -0700)
Lines: 24
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail