Hello!
I have been using CopyFileEx since the beginning of times and it has been working great. If the file is not locked, it will copy the file. If the file is locked, it will not and GetLastError will report the error. All fine and dandy.
However, there are some files that are partially locked, PST outlook files being the best example. In that case, CopyFileEx begins to copy, and when it hits the part of the file that is locked, it will hang and never return back (on Windows 7, maybe on other systems too).
Is there any way to avoid this problem?