There is a full functional CopyFileEx() realization. I'm offer it to KernelEx
What we know about:
In WindowsNT:
dwCopyFlags:
COPY_FILE_ALLOW_DECRYPTED_DESTINATION Ч suppose it works
COPY_FILE_FAIL_IF_EXISTS Ч Work as described in MSDN
COPY_FILE_RESTARTABLE Ч looks like ignored, at least in WinXP+
COPY_FILE_OPEN_SOURCE_FOR_WRITE Ч declared, but no any description.
All other Ц work as MSDN described, if has any audible description.
Win9x Ц basically not supported, added from MSLU.
Practic and Kex:
Works as CopyFile(), no callbacks, no stops, no extras.
Linux
Works as CopyFile(), no callbacks, no stops, no extras.
================================================================
What I offer:
dwCopyFlags:
COPY_FILE_ALLOW_DECRYPTED_DESTINATION - ignored
COPY_FILE_OPEN_SOURCE_FOR_WRITE - ignored
COPY_FILE_RESTARTABLE Ч trying to resume copy. NOT TEST is resumed part of file is a part of original file. In some cases might return immediately, but with no errors (feign as Windows).
0x10 = creates chains of folders, if it not.
0x20 = don't call lpProgressRoutine function, even if it given.
0x8000 = adds to lpProgressRoutine callback extra УtElapsФ parameter, with time, elapsed from previous call of lpProgressRoutine.
In callback StreamSize, StreamBytesTransferred, dwStreamNumber, dwCallbackReason no guarantee that identical to Windows, but on copy local files Ц same.
But remember, setting 0x8000 flag to dwCopyFlags also turn off precise emulation and dwStreamNumber, dwCallbackReason be always 0.
technical limitations:
Not analyze/works as if source and destination files lays in same media. NO speed bust when copying between different medias.
Not work witch vcache, no speed bust if recently same file accessing in same location.
i.e. on the whole it slower as MS original.
Probably has a problem with UNC paths greater then MAX_PATH, i'm not test this.
Function realized in CopyFileEx.cpp, also you need CreateDirectoriesA/W from filewin.cpp (dir chains creater)
Yes, comments on russian.
Any propositions and remarks?
Download: https://www.upload.ee/files/7937215/copyfileex2.zip.html