Article View: borland.public.csharpbuilder.language.csharp
Article #114Re: Pointer to memory blocks
From: Marc Rohloff TeamB
Date: Thu, 18 Jan 2007 19:45
Date: Thu, 18 Jan 2007 19:45
25 lines
1980 bytes
1980 bytes
On Thu, 18 Jan 2007 18:04:02 -0000, Ray wrote: > I am trying to transfer data from one application to another by sending a > pointer to a memory block. To test this out I have two applications, a > sender and a receiver. The sender fills an integer buffer and sets a pointer > to its address. Then I send a message via the interop SendMessage();. > > I get the message in the Receiver ok and the pointer value received is the > same as the one sent. But when I try to get the data all I get is garbage. You cannot send memory between applications by just sending a pointer. Each application addresses its own unique memory space and contents. You need to use one of: 1) TCP/IP 2) Webservices, remoting, etc. 3) Shared memory, Memory Mapped Files, etc 4) The WM_COPYDATA windows message 5) Real files 6) etc -- Marc Rohloff [TeamB] marc rohloff -at- myrealbox -dot- com
Technical Details
Message-ID:
<1iwcargjbfba8.dlg@dlg.marcrohloff.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<45afb662@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,661707b8138e8efd X-Google-Attributes: gid1efe35,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Marc Rohloff [TeamB]" <"on request"> Subject: Re: Pointer to memory blocks Newsgroups: borland.public.csharpbuilder.language.csharp User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit References: <45afb662@newsgroups.borland.com> Date: Thu, 18 Jan 2007 14:45:26 -0500 Message-ID: <1iwcargjbfba8.dlg@dlg.marcrohloff.com> X-Face: "huzh55Xi]!ZNni78>a*5+).`SK?<^q2MlHk-C]Z2M9T@\J5ZCB$95Ey+s"XQuhGFA[eutZ :0^AV!Q;t>gE`1-=8d;HZ6~*o1dH<X9\b$!|(}+I'!Xq)@3Op}%0ArW&nf'Qh*EwR X-Antivirus: avast! (VPS 0703-3, 01/17/2007), Outbound message X-Antivirus-Status: Clean NNTP-Posting-Host: 65.31.1.121 X-Trace: newsgroups.borland.com 1169149499 65.31.1.121 (18 Jan 2007 11:44:59 -0800) Lines: 25 X-Authenticated-User: mrohloff Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail