http://bugs.winehq.org/show_bug.cgi?id=46255
--- Comment #8 from Janne janne.kekkonen@gmail.com --- (In reply to Maotong Zhang from comment #7)
I ran your test program, but why are my results different from yours?
Both my Wine and Windows 11 give the same results. Ret val:00000000 LastError:2 Ret val:00000000 LastError:1006 Ret val:00000000 LastError:87 Could there be a difference in environment or test conditions?
I noticed that if file exists but is empty then there is error 1006. Did you have empty test2.txt file in c:\temp directory?