It fails on Windows 2000 server as well. The problem seems to be at line 2666: if (cli_read(cli1, fnum1, buf, 0, 4) != 4) Since the file is empty, read always return 0.