WinForms DragDrop path length limitation

↘锁芯ラ 提交于 2021-02-08 10:04:53

问题


I'm using WinForms and have a DragDrop operation that handles a file being dragged onto the window. This works fine but if the path to the file is very long it just fails. string[] fileList = (string[]) e.Data.GetData(DataFormats.FileDrop, false); results in fileList being null.

Does anyone know what the limitation is or any way to work around it?

Thanks!

Update: The data in GetFormats is as follows:

Short Filename:

Shell IDList Array UsingDefaultDragImage DragImageBits DragContext DragSourceHelperFlags InShellDragLoop FileDrop FileNameW FileName IsShowingLayered DragWindow IsComputingImage DropDescription DisableDragText ComputedDragImage IsShowingText

Long Filename:

Shell IDList Array UntrustedDragDrop UsingDefaultDragImage DragImageBits DragContext DragSourceHelperFlags InShellDragLoop FileDrop FileNameW FileName

来源:https://stackoverflow.com/questions/44253187/winforms-dragdrop-path-length-limitation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!