Differences

This shows you the differences between the selected revisions of the page.

dragext 2019-03-27 dragext 2022-10-21 (current)
Line 3: Line 3:
Note that with or without the extension you can always transfer files directly by dragging them between local and remote panels of [[ui_commander|Commander interface]]. With [[ui_pref_dragdrop#fake_file|some limitations]], you can also drag files out of WinSCP even without the extension. Note that with or without the extension you can always transfer files directly by dragging them between local and remote panels of [[ui_commander|Commander interface]]. With [[ui_pref_dragdrop#fake_file|some limitations]], you can also drag files out of WinSCP even without the extension.
- 
-//A bug in Windows 10 version 1803 (April 2018 Update) breaks the extension. [[bug>1644]] The latest version of WinSCP, when running on this version of Windows, uses a different mechanism to determine a drop target. The bug is fixed in version 1809 (October 2018 update). &recent// 
===== [[installation]] Installation and Set up ===== ===== [[installation]] Installation and Set up =====
Line 33: Line 31:
When the extension is not installed, WinSCP uses a trick to allow drag&drop downloads. It tells Windows File Explorer that the files are in temporary folder (from where Windows File Explorer knows how to get the files) and a moment before the Windows File Explorer starts to copy files from there, WinSCP downloads the files there. When the extension is not installed, WinSCP uses a trick to allow drag&drop downloads. It tells Windows File Explorer that the files are in temporary folder (from where Windows File Explorer knows how to get the files) and a moment before the Windows File Explorer starts to copy files from there, WinSCP downloads the files there.
-To allow direct drag&drop downloads, the shell extension was developed. It misuses Windows File Explorer CopyHook's. [[msdn>bb776048|CopyHook]] is a COM object (DLL library) that is called by Windows File Explorer whenever directory (not file) is transferred within file system. When you drag anything from WinSCP, it creates empty dummy folder in temporary directory and pretends that you as user drag that directory. Once your drop it to Windows File Explorer, it calls the CopyHook's (including the WinSCP shell extension), telling it what and where was dragged. This way WinSCP knows the actual destination. It cancels the drag&drop operation, so the dummy directory is not copied by Windows File Explorer and transfers your actual selection to now-known destination.+To allow direct drag&drop downloads, the shell extension was developed. It misuses Windows File Explorer CopyHook's. [[https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/bb776048(v=vs.85)|CopyHook]] is a COM object (DLL library) that is called by Windows File Explorer whenever directory (not file) is transferred within file system. When you drag anything from WinSCP, it creates empty dummy folder in temporary directory and pretends that you as user drag that directory. Once your drop it to Windows File Explorer, it calls the CopyHook's (including the WinSCP shell extension), telling it what and where was dragged. This way WinSCP knows the actual destination. It cancels the drag&drop operation, so the dummy directory is not copied by Windows File Explorer and transfers your actual selection to now-known destination.
This on the other hand explains why with the extension you cannot drag files to any other application except for the Windows File Explorer. No other application would call the CopyHook. This on the other hand explains why with the extension you cannot drag files to any other application except for the Windows File Explorer. No other application would call the CopyHook.

Last modified: by martin