Article View: borland.public.cppbuilder.nativeapi
Article #16380Re: Shared memory question
From: Vladimir Afanasyev
Date: Tue, 20 May 2003 08:56
Date: Tue, 20 May 2003 08:56
26 lines
2303 bytes
2303 bytes
"Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> wrote: > >"Vladimir Afanasyev" <avv@systema.kiev.ua> wrote in message >news:3ec4fae5$1@newsgroups.borland.com... > >> The question WHO will call DuplicateHandle >> is not important > >Yes, of course it is important. Only the second process needs to call it. >The first process doesn't need to, it can just create a second read-only >mapping handle directly (since it knows its own mapping names). It doesn't >need to duplicate its own original handle. > DuplicateHandle can duplicate handle for target process even it called from source process: "If the process that calls DuplicateHandle is not the target process, the duplicating process must use interprocess communication to pass the value of the duplicate handle to the target process. " (from Help). Calling DuplicateHandle from target process more suitable but I suppose that better call DuplicateHandle from source process. It is preventing uncontrolled expansion handles from target processes. Vladimir.
Technical Details
Message-ID:
<3ec9edca$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3ec201ad$1@newsgroups.borland.com> <3ec2709a@newsgroups.borland.com> <3ec37cee$1@newsgroups.borland.com> <3ec3c804$3@newsgroups.borland.com> <3ec3ceac$1@newsgroups.borland.com> <3ec41c72$1@newsgroups.borland.com> <3ec4fae5$1@newsgroups.borland.com> <3ec5145f$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,e0ac8188bda6f9e X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-05-20 02:23:00 PST From: "Vladimir Afanasyev" <avv@systema.kiev.ua> Sender: "Vladimir Afanasyev" <avv@systema.kiev.ua> Reply-To: "Vladimir Afanasyev" <avv@systema.kiev.ua> Subject: Re: Shared memory question Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 62.244.14.114 62.244.14.114 X-Forwarded-For: 192.168.0.147 References: <3ec201ad$1@newsgroups.borland.com> <3ec2709a@newsgroups.borland.com> <3ec37cee$1@newsgroups.borland.com> <3ec3c804$3@newsgroups.borland.com> <3ec3ceac$1@newsgroups.borland.com> <3ec41c72$1@newsgroups.borland.com> <3ec4fae5$1@newsgroups.borland.com> <3ec5145f$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.65 Message-ID: <3ec9edca$1@newsgroups.borland.com> Date: 20 May 2003 01:56:42 -0700 X-Trace: newsgroups.borland.com 1053421002 207.105.83.65 (20 May 2003 01:56:42 -0700) Lines: 26 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail