Even better emulate POSIX file functions (reduced)

This is reduced version of #5694.
Only obvious fixes.
Without this patch,this function always return 0 for zero buffer size, without real trying to read. Win32File (as well as PosixFile) is used directly in code, without CFile layer so it's good idea to support any possible parameter values.