Zebediah Figura (@zfigura) commented about dlls/kernelbase/file.c:
return ret;
}
+/***********************************************************************
- CopyFile2 (kernelbase.@)
- */
+HRESULT WINAPI CopyFile2( PCWSTR source, PCWSTR dest, COPYFILE2_EXTENDED_PARAMETERS *params ) {
- DWORD prev_err = GetLastError();
- HRESULT res;
- res = CopyFile2_impl(source, dest, params) ? S_OK : HRESULT_FROM_WIN32(GetLastError());
- SetLastError(prev_err);
- return res;
Perhaps better would just be to return the error directly from the helper.