I develop Namespace shell extension allows to browse my own archive type in Explorer. When I drag and drop file from NSE to TC nothing happens. I use the followings formats in IDataObject:
CF_FILEDESCRIPTORW
CF_FILEDESCRIPTORA
CF_FILECONTENTS
CF_ITEMIDLIST
In logs I see that TC request CF_ITEMIDLIST format first. But CF_ITEMIDLIST points on virtual files and TC stops dropping. But when I remove CF_ITEMIDLIST from format list TC requests CF_FILEDESCRIPTORW/CF_FILECONTENTS and everything works fine.
To Ghisler:
Could you change the logic of processing of IDataObject? Is it possible to process CF_FILEDESCRIPTORW/CF_FILECONTENTS when processing of CF_ITEMIDLIST fails?
Drag and drop from NSE to Total Commander panel fails
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
There is no documentation from Microsoft in which order Explorer processes drag&drop types. Therefore TC tries those first which return more useful data. Why doesn't CF_ITEMIDLIST return anything usable?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
I agree.ghisler(Author) wrote:There is no documentation from Microsoft in which order Explorer processes drag&drop types.
No problem. But TC does not continue work with other formats when work with CF_ITEMIDLIST fails. For example when I copy my IDataObect to clipboard TC pastes it correctly always. But in case of Drag&Drop it fails when CF_ITEMIDLIST presents.ghisler(Author) wrote:Therefore TC tries those first which return more useful data.
CF_ITEMIDLIST contains legal PItemIDList which points on virtual object which is not the part of real file system. This format is necessary for other destinations.ghisler(Author) wrote:Why doesn't CF_ITEMIDLIST return anything usable?
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
This works with other programs - why shouldn't it work for real files, they are also virtual files (the opposite isn't always true). TC tries to get the IShellFolder for the parent, then get the IID_IContextMenu for the list of files and copy them via clipboard functions.CF_ITEMIDLIST contains legal PItemIDList which points on virtual object which is not the part of real file system. This format is necessary for other destinations.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com