Timothy B. Terriberry wrote: > _lseeki64 operates on the underlying file handle, and does not interact > well with the buffering in stdio streams. I _think_ you can use this > successfully if you call fflush() beforehand (as this sets FILE::_cnt to > 0 and FILE::_ptr to FILE::_base). By which I mean I read the MSVCRT > source from MSVC6.0 and it appears this is how things work. Ok, I didn't take that into account. Thanks for pointing it out! Using fflush to clear the buffers before calling _lseeki64 sounds reasonable, so I think I'll try that.
I noticed another problem with _lseeki64 though. It returns the new file pointer position on success instead of 0, so the macro will have to take that into account. > That source also includes an fseeki64()/ftelli64(), but they are not > defined in stdio.h. I wonder if just declaring it yourself is good > enough? Those functions are not exported by XPs msvcrt.dll, so declaring them won't help. _______________________________________________ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev