Bfile_OpenFile_OS has a third parameter which must be set to zero (thanks Simon).