Closed yyjdelete closed 1 year ago
Thank you for looking into it!
Probably another application is blocking the clipboard on your one computer, leading to this error. If your changes make it work consistently, I think there is no real downside to setting copy: false
.
Would you like to open a pull request for your changes?
Preflight Checklist
EverythingToolbar Version
1.0.3.0
Windows Version
Win10 22H2
Steps to reproduce
Expected Behavior
Copy should success immediately
Actual Behavior
It freezen for 1 second, After about 1 second, a messagebox is shown with translated message of
MessageBoxFailedToCopyFile
But the file does in clipboard and can be paste byCtrl+V
Screenshots
No response
Log output
Additional Information
The CLIPBRD_E_CANT_OPEN only happens on one of my PC, but works well on another one even without the below patch.
I try to find it on the web, seems it's an bug of winapi, and the only workaroud is to disable flush by
Clipboard.SetDataObject(dataObj , copy: false);
withcopy: false
directly. And change the code ofSearchResult.CopyToClipboard
to the below works well on my PC.https://learn.microsoft.com/en-us/dotnet/api/system.windows.clipboard.setdataobject?view=netframework-4.8.1#system-windows-clipboard-setdataobject(system-object-system-boolean)