简体   繁体   中英

How do I get CopyFileEx to report back so I can cancel a file copy operation?

I'm trying to use the FileUtilities.CopyFile wrapper for CopyFileEx from here . But the CopyFileCallbackAction doesn't get called until after the file is copied (I've tried copying a large file). How do I get it to report back so I can cancel the copy if the user so wishes?

EDIT:

See Why is FileUtilities.CopyFile wrapper for CopyFileEx interfering with winforms?

The edit to my question (sending to Why is FileUtilities.CopyFile wrapper for CopyFileEx interfering with winforms? ) sends to the answer (by david-heffernan ) – I had all on one thread.

EDIT: No. It seems that I had a this.Update(); missing. See How can I get code to run after a form is shown? (Trouble with "Shown".) .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM