<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>What a drag: Dragging a virtual file (IStorage edition)</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2008/03/20/8080229.aspx</link><description>I doubt anybody will ever need this.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: What a drag: Dragging a virtual file (IStorage edition)</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2008/03/20/8080229.aspx#8337838</link><pubDate>Wed, 26 Mar 2008 17:44:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8337838</guid><dc:creator>Anthony Wieser</dc:creator><description>&lt;p&gt;I see from msdn online this works on XP and later systems. &amp;nbsp;oops.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8337838" width="1" height="1"&gt;</description></item><item><title>re: What a drag: Dragging a virtual file (IStorage edition)</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2008/03/20/8080229.aspx#8337835</link><pubDate>Wed, 26 Mar 2008 17:42:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8337835</guid><dc:creator>Anthony Wieser</dc:creator><description>&lt;p&gt;Now all I need to do is figure out how to implement the other end of the drop target so that I can register file associations.&lt;/p&gt;
&lt;p&gt;MSDN says this:&lt;/p&gt;
&lt;p&gt;On Microsoft Windows XP systems, enhanced support is added for applications that implement drag-and-drop features and expose their IDropTarget interface. With this method, the Shell communicates with the application through the Component Object Model (COM) subsystem. This method offers a significant performance gain over both the command line method and DDE. To use this method, add a DropTarget subkey under a verb's key. Under the DropTarget, add a registry string named Clsid, and set the value of this string to a valid CLSID Key.&lt;/p&gt;
&lt;p&gt;MSDN online also adds this helpful advice:&lt;/p&gt;
&lt;p&gt;Implementations of IDropTarget::Drop need to return quickly to the caller avoid causing an unresponsive state. There are two ways to accomplish this: &lt;/p&gt;
&lt;p&gt;Marshall the input IDropTarget to a new thread.&lt;/p&gt;
&lt;p&gt;Take a reference to the data object, set a short timer, and process the drop against that timer. If you use this method, you must ensure that you do not begin processing a second drop while the first is still being processed.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/bb776883.aspx"&gt;http://msdn2.microsoft.com/en-us/library/bb776883.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;What it doesn't say is: Does this work on Vista?&lt;/p&gt;
&lt;p&gt;I assume all I need to do is expose on object on my exe with the specified CLSID that supports an IDropTarget interface.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8337835" width="1" height="1"&gt;</description></item><item><title>re: What a drag: Dragging a virtual file (IStorage edition)</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2008/03/20/8080229.aspx#8330021</link><pubDate>Sat, 22 Mar 2008 01:31:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8330021</guid><dc:creator>Matt Green</dc:creator><description>&lt;p&gt;If you want to integrate with Windows, you will probably have to learn it. If you're not aiming to do that, then learn the concepts behind it and why it developed the way it did.&lt;/p&gt;
&lt;p&gt;I know the basics and how to use it in a pinch, but I probably couldn't write a COM component easily, and I consider myself a fairly competent Windows developer. Maybe I'm not if I try to avoid COM... ;)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8330021" width="1" height="1"&gt;</description></item><item><title>re: What a drag: Dragging a virtual file (IStorage edition)</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2008/03/20/8080229.aspx#8328357</link><pubDate>Fri, 21 Mar 2008 06:14:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8328357</guid><dc:creator>Rivari</dc:creator><description>&lt;p&gt;@Anon&lt;/p&gt;
&lt;p&gt;I am a computer science student and I wonder if it still a good idea to learn COM!&lt;/p&gt;
&lt;p&gt;What do you think?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8328357" width="1" height="1"&gt;</description></item><item><title>re: What a drag: Dragging a virtual file (IStorage edition)</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2008/03/20/8080229.aspx#8328331</link><pubDate>Fri, 21 Mar 2008 05:49:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8328331</guid><dc:creator>Anon</dc:creator><description>&lt;p&gt;@gb &lt;/p&gt;
&lt;p&gt;You can't fool me. I've seen lots of movies where esoteric computer knowledge saves the world. When the aliens attack, a knowledge of COM and OLE may save the world. It's certainly more likely than them using Macs like the aliens in Independence Day. Watch the skys but make sure you read Dale Rogerson!&lt;/p&gt;
&lt;p&gt;More to the point, I could hack up an explorer style application with a treeview/splitter/listview/menu bar that lets me drag and drop files from my PTP device. Or anything else for that matter.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8328331" width="1" height="1"&gt;</description></item><item><title>re: What a drag: Dragging a virtual file (IStorage edition)</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2008/03/20/8080229.aspx#8328081</link><pubDate>Fri, 21 Mar 2008 02:01:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8328081</guid><dc:creator>Chris Charabaruk</dc:creator><description>&lt;p&gt;@gb When you need it, you'll be able to use it.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8328081" width="1" height="1"&gt;</description></item><item><title>re: What a drag: Dragging a virtual file (IStorage edition)</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2008/03/20/8080229.aspx#8328060</link><pubDate>Fri, 21 Mar 2008 01:46:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8328060</guid><dc:creator>gb</dc:creator><description>&lt;p&gt;god dammit it's so boring, what's the purpose raymond?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8328060" width="1" height="1"&gt;</description></item><item><title>re: What a drag: Dragging a virtual file (IStorage edition)</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2008/03/20/8080229.aspx#8327943</link><pubDate>Fri, 21 Mar 2008 00:20:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8327943</guid><dc:creator>Dan</dc:creator><description>&lt;p&gt;Steve: Are you nitpicking? &amp;nbsp;I don't think those are virtual files (or real files; doesn't outlook use one large file for all your e-mail?)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8327943" width="1" height="1"&gt;</description></item><item><title>re: What a drag: Dragging a virtual file (IStorage edition)</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2008/03/20/8080229.aspx#8327472</link><pubDate>Thu, 20 Mar 2008 18:34:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8327472</guid><dc:creator>JamesNT</dc:creator><description>&lt;p&gt;Mr. Chen,&lt;/p&gt;
&lt;p&gt;Thank you for this series. &amp;nbsp;It has been one of the most fun so far.&lt;/p&gt;
&lt;p&gt;JamesNT&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8327472" width="1" height="1"&gt;</description></item><item><title>re: What a drag: Dragging a virtual file (IStorage edition)</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2008/03/20/8080229.aspx#8327417</link><pubDate>Thu, 20 Mar 2008 17:14:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8327417</guid><dc:creator>Steve Thresher</dc:creator><description>&lt;p&gt;I may be missing the obvious but doesn't outlook use structured storage when dragging messages around.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8327417" width="1" height="1"&gt;</description></item></channel></rss>