<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Dear Lazyweb: FD passing on Win32?  How?</title>
	<atom:link href="http://dossy.org/2006/02/dear-lazyweb-fd-passing-on-win32-how/feed/" rel="self" type="application/rss+xml" />
	<link>http://dossy.org/2006/02/dear-lazyweb-fd-passing-on-win32-how/</link>
	<description>Everything that comes out of Dossy, from the strange to the banal.</description>
	<lastBuildDate>Fri, 27 Jan 2012 14:30:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jamie Rasmussen</title>
		<link>http://dossy.org/2006/02/dear-lazyweb-fd-passing-on-win32-how/comment-page-1/#comment-286</link>
		<dc:creator>Jamie Rasmussen</dc:creator>
		<pubDate>Thu, 09 Feb 2006 06:20:53 +0000</pubDate>
		<guid isPermaLink="false">http://dossy.org/archives/000224.html#comment-286</guid>
		<description>I think several forms of interprocess communication would work, it depends on your situation.  Named pipe is an option.  I&#039;m assuming the processes are unrelated, since a child process can inherit handles from the parent - it&#039;s a parameter of CreateProcess.  I haven&#039;t ever needed to do this with unrelated processes, so I hope it works. :-)</description>
		<content:encoded><![CDATA[<p>I think several forms of interprocess communication would work, it depends on your situation.  Named pipe is an option.  I&#8217;m assuming the processes are unrelated, since a child process can inherit handles from the parent &#8211; it&#8217;s a parameter of CreateProcess.  I haven&#8217;t ever needed to do this with unrelated processes, so I hope it works. <img src='http://dossy.org/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dossy</title>
		<link>http://dossy.org/2006/02/dear-lazyweb-fd-passing-on-win32-how/comment-page-1/#comment-285</link>
		<dc:creator>Dossy</dc:creator>
		<pubDate>Wed, 08 Feb 2006 13:15:57 +0000</pubDate>
		<guid isPermaLink="false">http://dossy.org/archives/000224.html#comment-285</guid>
		<description>You know, I looked at _get_osfhandle and _open_osfhandle, but I totally missed &lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/duplicatehandle.asp&quot;&gt;DuplicateHandle&lt;/a&gt;.

On the MSDN Library page for DuplicateHandle, it says:

&lt;i&gt;&quot;If the process that calls &lt;b&gt;DuplicateHandle&lt;/b&gt; is not also the target process, the source process must use interprocess communication to pass the value of the duplicate handle to the target process.&quot;&lt;/i&gt;

So, I&#039;d use a pipe and write the value of the duplicated handle across to the child process?  I guess coming from Unix, the notion that one process can duplicate a filehandle into another process&#039;s space is ... unsettling.  :-)

Thanks for the pointer, Jamie.  You&#039;re the best.</description>
		<content:encoded><![CDATA[<p>You know, I looked at _get_osfhandle and _open_osfhandle, but I totally missed <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/duplicatehandle.asp">DuplicateHandle</a>.</p>
<p>On the MSDN Library page for DuplicateHandle, it says:</p>
<p><i>&#8220;If the process that calls <b>DuplicateHandle</b> is not also the target process, the source process must use interprocess communication to pass the value of the duplicate handle to the target process.&#8221;</i></p>
<p>So, I&#8217;d use a pipe and write the value of the duplicated handle across to the child process?  I guess coming from Unix, the notion that one process can duplicate a filehandle into another process&#8217;s space is &#8230; unsettling.  <img src='http://dossy.org/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Thanks for the pointer, Jamie.  You&#8217;re the best.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Rasmussen</title>
		<link>http://dossy.org/2006/02/dear-lazyweb-fd-passing-on-win32-how/comment-page-1/#comment-284</link>
		<dc:creator>Jamie Rasmussen</dc:creator>
		<pubDate>Wed, 08 Feb 2006 05:50:59 +0000</pubDate>
		<guid isPermaLink="false">http://dossy.org/archives/000224.html#comment-284</guid>
		<description>Have you tried a sequence like:
_get_osfhandle -&gt; DuplicateHandle -&gt; _open_osfhandle?</description>
		<content:encoded><![CDATA[<p>Have you tried a sequence like:<br />
_get_osfhandle -> DuplicateHandle -> _open_osfhandle?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc
Database Caching 1/7 queries in 0.055 seconds using apc
Object Caching 272/276 objects using apc

Served from: dossy.org @ 2012-02-07 03:44:13 -->
