Context : the goal is to achieve an efficient FileCopy method which would allow to access the in-flight data to compute at least one kind of checksum for each data streams.
If you look at the syscalls made by Win32 FileCopy, you'll notice that if the file, source or destination, is stored on an SMB share, it'll reopen the handle for async I/O and then issue IOCTL_LMR_DISABLE_LOCAL_BUFFERING.
According to the MSDN description, it suspiciously looks like opening the handle with FILE_FLAG_NO_BUFFERING would achieve an equivalent result... But then why this IOCTL ?
https://learn.microsoft.com/en-us/windows/win32/devnotes/ioctl-lmr-disable-local-buffering
Does anybody know ?