I would guess that the problem is in the printer driver. Windows 2000 support for old printers is less than stellar. Click
here to search Epson.com for an updated printer driver, but I didn't see one for a xx-850 dot matrix printer for Windows 2000. They have drivers for old printers for old Windows versions.
Look
here for some other ideas.
You can also try a couple of different methods instead of fopen:
If you need to print a line at a time, build a string (e.g. myData) and try
PrintTextBuffer (myData, "LPT1");
If you can wait to print a bigger chunk of data, write the data to a file then use
PrintTextFile ("myOutputFile.txt", "LPT1");
If other applications are working with the printer, you could call use one of them to print the file, e.g. use ActiveX to tell Word to print the file or use notepad by calling
system("notepad /p \"d:\\my documents\\myOutputFile.txt\"");