I have a WPF application. I want to allow users to drag and drop "files" (or their visual representation) from my WPF windows to the real Windows explorer.
This I managed to do by using the native DoDragDrop from Ole32.dll
[DllImport("ole32.dll", CharSet = CharSet.Auto, ExactSpelling = true, PreserveSig = false)]
public static extern void DoDragDrop(System.Runtime.InteropServices.ComTypes.IDataObject dataObject IDropSource dropSource, int allowedEffects, int[] finalEffect);
This works great.
But rather then copy the file, I want to just get the destination. i.e. if the user dragged the file to an explorer opened on C:\Folder - I want to get C:\Folder... Or at least get the object on which the drop event occurred at (which is outside my application), and hopefully I could then get the path from that object.