Article View: borland.public.csharpbuilder.language.csharp
Article #115Re: Pointer to memory blocks
From: Ray
Date: Fri, 19 Jan 2007 18:45
Date: Fri, 19 Jan 2007 18:45
37 lines
2135 bytes
2135 bytes
Thanks Marc Can you point me in the direction of some info on 3) Shared memory, Memory Mapped Files, etc Ray "Marc Rohloff [TeamB]" <"on request"> wrote in message news:1iwcargjbfba8.dlg@dlg.marcrohloff.com... > 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:
<45b11161@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45afb662@newsgroups.borland.com> <1iwcargjbfba8.dlg@dlg.marcrohloff.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: "Ray" <noreply@daemon.com> Newsgroups: borland.public.csharpbuilder.language.csharp References: <45afb662@newsgroups.borland.com> <1iwcargjbfba8.dlg@dlg.marcrohloff.com> Subject: Re: Pointer to memory blocks Date: Fri, 19 Jan 2007 18:45:58 -0000 Lines: 39 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 62.56.16.66 Message-ID: <45b11161@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1169232225 62.56.16.66 (19 Jan 2007 10:43:45 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail