<?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: C#: Delete a file to the recycle bin</title>
	<atom:link href="http://www.daveamenta.com/2008-05/c-delete-a-file-to-the-recycle-bin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.daveamenta.com/2008-05/c-delete-a-file-to-the-recycle-bin/</link>
	<description>Indisposable By Default</description>
	<lastBuildDate>Tue, 20 Jul 2010 05:10:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dave</title>
		<link>http://www.daveamenta.com/2008-05/c-delete-a-file-to-the-recycle-bin/comment-page-1/#comment-6705</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 26 Feb 2010 20:06:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.daveamenta.com/?p=20#comment-6705</guid>
		<description>@MdBoy - Thanks for pointing that out!  When I wrote this little example, I wasn&#039;t using an x64 operating system, and did not consider that.  I will go back and update this article to be platform independent.</description>
		<content:encoded><![CDATA[<p>@MdBoy &#8211; Thanks for pointing that out!  When I wrote this little example, I wasn&#8217;t using an x64 operating system, and did not consider that.  I will go back and update this article to be platform independent.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MdBoy</title>
		<link>http://www.daveamenta.com/2008-05/c-delete-a-file-to-the-recycle-bin/comment-page-1/#comment-6703</link>
		<dc:creator>MdBoy</dc:creator>
		<pubDate>Fri, 26 Feb 2010 17:59:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.daveamenta.com/?p=20#comment-6703</guid>
		<description>I know it&#039;s been long time since release but worth mentioning that to fix the code for 64bit you need to remove Pack = 1 from struct. 

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto, Pack = 1)]

Reason:
Under x64, the SHFILEOPSTRUCT must be declared without the Pack = 1 parameter, or it will fail. This is a real pain if you want your code to be platform independent, as you have to declare two separate structures, one with Pack = 1, and one without. You then have to declare two different SHFileOperation  calls, one for each of the structures. Then you have to decide which one to call depending on whether you are running on 32 or 64 bit.</description>
		<content:encoded><![CDATA[<p>I know it&#8217;s been long time since release but worth mentioning that to fix the code for 64bit you need to remove Pack = 1 from struct. </p>
<p>[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto, Pack = 1)]</p>
<p>Reason:<br />
Under x64, the SHFILEOPSTRUCT must be declared without the Pack = 1 parameter, or it will fail. This is a real pain if you want your code to be platform independent, as you have to declare two separate structures, one with Pack = 1, and one without. You then have to declare two different SHFileOperation  calls, one for each of the structures. Then you have to decide which one to call depending on whether you are running on 32 or 64 bit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete Souza</title>
		<link>http://www.daveamenta.com/2008-05/c-delete-a-file-to-the-recycle-bin/comment-page-1/#comment-2393</link>
		<dc:creator>Pete Souza</dc:creator>
		<pubDate>Sat, 16 May 2009 05:17:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.daveamenta.com/?p=20#comment-2393</guid>
		<description>Nice, but doesn&#039;t seem to work under Windows 7 x64.  File is just never deleted (full Admin permissions).</description>
		<content:encoded><![CDATA[<p>Nice, but doesn&#8217;t seem to work under Windows 7 x64.  File is just never deleted (full Admin permissions).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How to roll back file delete operation - bytes</title>
		<link>http://www.daveamenta.com/2008-05/c-delete-a-file-to-the-recycle-bin/comment-page-1/#comment-721</link>
		<dc:creator>How to roll back file delete operation - bytes</dc:creator>
		<pubDate>Tue, 24 Feb 2009 15:59:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.daveamenta.com/?p=20#comment-721</guid>
		<description>[...] Hi,  Please refer the following link for your requirement: http://www.daveamenta.com/2008-05/c-...e-recycle-bin/ [...]</description>
		<content:encoded><![CDATA[<p>[...] Hi,  Please refer the following link for your requirement: <a href="http://www.daveamenta.com/2008-05/c-...e-recycle-bin/" rel="nofollow">http://www.daveamenta.com/2008-05/c-&#8230;e-recycle-bin/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.daveamenta.com/2008-05/c-delete-a-file-to-the-recycle-bin/comment-page-1/#comment-30</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Sat, 07 Jun 2008 16:50:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.daveamenta.com/?p=20#comment-30</guid>
		<description>That is correct - you will need to check that the files are gone from your source location before you continue.  Not only would that be good practice either way, but I think it would be the best way to detect errors that could come from other places.</description>
		<content:encoded><![CDATA[<p>That is correct &#8211; you will need to check that the files are gone from your source location before you continue.  Not only would that be good practice either way, but I think it would be the best way to detect errors that could come from other places.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abdullah Battal</title>
		<link>http://www.daveamenta.com/2008-05/c-delete-a-file-to-the-recycle-bin/comment-page-1/#comment-26</link>
		<dc:creator>Abdullah Battal</dc:creator>
		<pubDate>Wed, 28 May 2008 07:45:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.daveamenta.com/?p=20#comment-26</guid>
		<description>The code works, but it doesn&#039;t give us a chance to understand if the user changes his mind when the delete confirmation box appears. For example; it&#039;s not possible to change a label&#039;s text as &quot;file deleted&quot; or &quot;operation cancelled&quot; according to the user&#039;s response to the confirmation dialog. Or, at least, I couldn&#039;t do it... :/
RecybleBin.Send always returns true.</description>
		<content:encoded><![CDATA[<p>The code works, but it doesn&#8217;t give us a chance to understand if the user changes his mind when the delete confirmation box appears. For example; it&#8217;s not possible to change a label&#8217;s text as &#8220;file deleted&#8221; or &#8220;operation cancelled&#8221; according to the user&#8217;s response to the confirmation dialog. Or, at least, I couldn&#8217;t do it&#8230; :/<br />
RecybleBin.Send always returns true.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Amenta .com &#187; Blog Archive &#187; What is P/Invoke (Pinvoke)</title>
		<link>http://www.daveamenta.com/2008-05/c-delete-a-file-to-the-recycle-bin/comment-page-1/#comment-7</link>
		<dc:creator>Dave Amenta .com &#187; Blog Archive &#187; What is P/Invoke (Pinvoke)</dc:creator>
		<pubDate>Fri, 09 May 2008 00:54:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.daveamenta.com/?p=20#comment-7</guid>
		<description>[...] ShowWindow is an example of an API that has been wrapped nicely by the .NET CLR, it is unlikely that you will ever need to import and call it.  But something more useful might be: Deleting a file to the recycle bin. [...]</description>
		<content:encoded><![CDATA[<p>[...] ShowWindow is an example of an API that has been wrapped nicely by the .NET CLR, it is unlikely that you will ever need to import and call it.  But something more useful might be: Deleting a file to the recycle bin. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
