in reply to Problem opening large file

Try opening the file with sysopen(). According to this page, that will open the file with the O_LARGEFILE option which should solve your problem.