Q: When dragging a file from my application to the Explorer, how can I determine the folder where the file is dropped?
A: In short, you can’t.
You must understand that the drag/drop
API works the same for all applications that uses it, and the Explorer is just like any other application. The drag/drop
API provides a framework that facilitates the interaction between a drop source and the target, but since the drop target can do anything it wants with the data it receives, there is no way to communicate the destiny of the data back to the drop source in a uniform way.
One target may chose to display the dropped data (e.g. notepad), another one to upload it to a web server (e.g. a
FTP client), a third to move and rename the file (e.g. the Recycle Bin) and a fourth may chose to copy or move the file (e.g. Explorer).
In my experience there is never any real need to know the destination of a drop to the Explorer. If you find that you do need this, you should rethink your solution. - and feel free to ask for help