SHFileOperation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using SHFileOperation() to copy files from the local hard drive a network share using a mapped drive. I want to set the up as a batch process with no user intervention. I have using the fFlags of FOF_NOCONFIRMATION | FOF_NOCONFIRMMKDIR | FOF_SILENT | FOF_NOERRORUI. When I added the FOF_NOERRORUI flag and a call to SHFileOperation() fails; all subsequent calls to the function fail with the same error code. Remove the FOF_NOERRORUI flag and SHFileOperation() operates normally; but i get a dialog box that requires a user response when an error occurs. shell32.dll in Windows XP is version 6.0.2800.1233. 1) How do I reset the SHFileOperation() after a failure with no user intervention? 2) How do I report the apparent "bug" to without having to pay fees?
 
Are you copying each file individually in calls to SHFileOperation or are
you using a wildcard in the source? If you are copying 1 by 1 you can check
if an error is returned from the function (non-zero) or if
fAnyOperationsAborted is set to true. In that case you can log that the
specific file failed and move on to the next file.

What is the error dialog you are getting? What is the scenario that is
failing (source/destination path)?

Thanks,
Christopher Davis [MSFT]
 
Back
Top