Re: FREAD fails on files >4GB



Richie Kernagan wrote:

Howdy

Problem with the fread() call on MS Visual Studio 2005 running under
Win 64.

The parameters to fread size and count are both size_t ie 64 bits.
Even so the call fails when the size arg is greater than 4GB (ie
exceeds 32 bit unsigned value).

Any suggestions.

Thanks in advance.

In many cases additional flags must be defined for an implementation to
support files larger than 4 Gb. Verify that you have done so. Any such
requirement should be documented in the reference documentation for
your implementation.

Also post your actual code that fails (as minimal an example as
possible), along with details of fread's input and output, and the
exact error that you have detected.

.



Relevant Pages

  • Re: FREAD fails on files >4GB
    ... Problem with the fread() call on MS Visual Studio 2005 running under Win 64. ... so the call fails when the size arg is greater than 4GB (ie exceeds 32 ...
    (comp.lang.c)
  • Re: The fread() that could.
    ... L. Spiro wrote: ... > fread() simply fails. ... I never use the stream i/o stuff myself, but I think you'll find _fsopen ...
    (microsoft.public.win32.programmer.kernel)
  • Re: FREAD fails on files >4GB
    ... Problem with the fread() call on MS Visual Studio 2005 running under Win 64. ... "I disapprove of what you say, but I'll defend to the death your right to say it." ...
    (comp.lang.c)