Topic "drag drop question"

Author Message
michaelh

Guest


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
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
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.
_________________
Martin Prikryl
michaelh

Guest


prikryl 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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
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).
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License