Piotr Caban (@piotr) commented about dlls/msvcrt/file.c:
{ ret = -1; msvcrt_set_errno(GetLastError());
if (GetLastError() == ERROR_ACCESS_DENIED)
*_errno() = EBADF;
In bug you have attached test application. It will not be fixed by this change. errno should be set in ```c if (info_nd == &MSVCRT___badioinfo) { *_errno() = EBADF; ret = -1; } ``` case. Please also add the test to wine.