drag drop question

Advertisement

michaelh
Guest

drag drop question

Somewhere on line the drag drop documentions states :

When the extension is not installed, WinSCP uses trick to allow drag&drop downloads. It tells Windows Explorer that the files are in temporary folder (from where Windows Explorer knows how to get the files) and a moment before the Windows Explorer starts to copy files from there, WinSCP downloads the files there.

I'm trying to create similar functionality in my application. what is the sequence of events that happens? winscp tells windows Explorer to look in a temp directory for a file, then winscp copies the the file to the temp directory, then windows explorer copies it from the temp directory to the ultimate destination? If so, how does windows explorer know to wait until you finish downloading the file before it transfers it?

Thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,506
Location:
Prague, Czechia

Your application gets notified when the files are dropped. You need to download the files from the event handler, so they are in the temp directory before the target application gets control.

Reply with quote

michaelh
Guest

drag drop question

martin wrote:

Your application gets notified when the files are dropped. You need to download the files from the event handler, so they are in the temp directory before the target application gets control.

Seems like the target application would get control as soon as the files are dropped which would leave my application no time to transfer the files.

Reply with quote

martin
Site Admin
martin avatar

Re: drag drop question

michaelh wrote:

Seems like the target application would get control as soon as the files are dropped which would leave my application no time to transfer the files.
You have to do the download from within IDropSource.QueryContinueDrag(..., DRAGDROP_S_DROP).

Reply with quote

Advertisement

You can post new topics in this forum