Probably because some third-party context menu handler is trying to read the file when you right click it, thus triggering the download.
How can i check which app trigger this action or how to prevent this download action??
In
OnFetchData
callback, the
callbackInfo->ProcessInfo->ImagePath
will give you the full path of the app that triggers the download, see:
https://github.com/microsoft/Windows-classic-samples/blob/master/Samples/CloudMirror/CloudMirror/FileCopierWithProgress.cpp#L279
In
OnFetchData
, set
CF_OPERATION_PARAMETERS.TransferData.CompletionStatus
to a non-success status like
STATUS_UNSUCCESSFUL
will prevent the download, see:
https://github.com/microsoft/Windows-classic-samples/blob/master/Samples/CloudMirror/CloudMirror/FileCopierWithProgress.cpp#L84