|
-
May 11th, 2016, 08:23 AM
#15
Re: [VB6] Use IFileOperation to replace SHFileOperation for modern Copy/Move box/prom
I'm sure I noted it somewhere... but for some compatibility reason I don't recall too well (this decision was nearly 1.5 years ago in the first version of oleexp), I left the FILEOP_Flags enum alone (the one that contains FOF_SILENT) so that SHFileOperation users didn't get confused/think they could use all the new FOFX_ flags that only apply to IFileOperation. So for IFileOperation I made a new enum, IFO_Flags, and just changed FOF_ and FOFX_ to IFO_ and IFOX_. So FOF_SILENT is the same as IFO_SILENT, and the IFO_ enum is in fact the one that applies to IFileOperation (and thus cFO.Flags).
Pause/Continue can't really be done well here... remember this is an interface to Window's functions, it's not the VB project or typelib that contains the code that performs the operation. The only things you have to work with are the callback events, but I believe even if you put a function in that didn't return, you'd need a DoEvents somewhere to have a responsive UI to continue, and that would just let the op continue.
What you can do is fall back to the lower level CopyFileEx and related APIs, which do offer such functionality.
Last edited by fafalone; May 11th, 2016 at 08:27 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|