Article View: borland.public.cppbuilder.nativeapi
Article #9803Re: Same memory piece for 2 running applications?
From: Ramy
Date: Tue, 08 Jun 2004 14:46
Date: Tue, 08 Jun 2004 14:46
36 lines
1832 bytes
1832 bytes
Thanks very much, what i did eventually was to pass the array (which is actually a bitmap) through the Clipboard, first i check if it's open by the other application, if not, i lock it, (the clipboard i mean) read/write from it, and release it. It's working OK. Thanks. Hans Galema <dontusethis@dontusethis.nl> wrote: >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:
<40c5d153@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<40c58d7a$1@newsgroups.borland.com> <40c594e3$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 From: "Ramy" <Ramy@NoMail.com> Sender: "Ramy" <Ramy@NoMail.com> Reply-To: "Ramy" <Ramy@NoMail.com> Subject: Re: Same memory piece for 2 running applications? Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 62.0.27.152 References: <40c58d7a$1@newsgroups.borland.com> <40c594e3$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <40c5d153@newsgroups.borland.com> Date: 8 Jun 2004 07:46:43 -0700 X-Trace: newsgroups.borland.com 1086706003 207.105.83.66 (8 Jun 2004 07:46:43 -0700) Lines: 37 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail