Skip to main content

begin_drag

Function begin_drag 

Source
pub fn begin_drag(request: impl Into<TransferRequest>) -> Result<TransferHandle>
Expand description

Starts a Windows OLE drag-and-drop operation for the supplied virtual files.

This calls DoDragDrop on the current thread and returns when the drag operation ends. The receiver may continue fetching file contents asynchronously after this function returns.

Call this from a suitable Windows UI thread with a message loop. The function initializes OLE for the duration of the drag operation.

The request must contain at least one file and must not contain duplicate or conflicting paths. A Vec<VirtualFile> can be passed directly.

ยงErrors

Returns Error::InvalidInput for invalid transfers or Error::Platform if OLE initialization or drag-and-drop fails.