On Mon Feb 5 04:44:12 2024 +0000, Kartavya Vashishtha wrote:
I discovered that through the failing tests as well. Turns out, [it's not straightforward (Raymond Chen's blog)](https://devblogs.microsoft.com/oldnewthing/20061103-07/?p=29133). Maybe having CopyFile2 functionality but with `SetLastError`-style error handling, and then write a wrapper over it for `CopyFile2` to convert to HRESULT?
@Alcaro `HRESULT_CODE` actually shouldn't be too bad since [`CopyFile2` _only_ returns S_OK or `HRESULT_FROM_WIN32(..)`](https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-copyf...).