Re: How to read large files with VC6



Thanks for a quick answer.

I didnt catch any errno's, I have to compile that in first.

Regards

Alex Blekhman wrote:
> LM wrote:
> > Hi all.
> > I am making a file utility for my self with Visual C v6.
> > It works but when I tried to give it a 3GB file it gave
> > an error. I know about that limitation in Win98. Still
> > for many reasons I prefer VC6 over VC.net. So, is there
> > an easy way read/write large file in VC6.
> >
> > Parts of code:
> >
> > long file1l;
> >
> > stream1=fopen(filename,"rb");
> > if (stream1==NULL) {
> > return 1;
> > }
> >
> > file1l=ftell(stream1);
> > if (file1l==-1) {
> > return 2; //This seems to give an
> > error }
> >
> > numberofbytes=fread(fbuffer+locb2,1,file2-locf2,stream2);
> >
> >
> > I am using XP pro sp2.
>
> What's the value of errno? Probably fo files that big you
> should use _telli64 and _lseeki64.

.



Relevant Pages

  • RE: Switching SMTP "on"
    ... Not sure how to either find out for sure, or compile it to be so, but ... Regards ... > Chris, it sounds to me like you're using a sledgehammer ... -- redhat-list mailing list unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe ...
    (RedHat)
  • Re: building the kernel
    ... > So iam guessing I didnt include some hardware support I needed. ... > sound configuration in the kernel. ... You may find it easier to start with the config file from the ... Then before going any further in the compile run ...
    (comp.os.linux)
  • Nagios problem
    ... Many Thanks Andy, ... Did you install from a package or compile from source? ... > Best Regards, ... ZESPRI does not make any representations as to the accuracy of the information ...
    (SunManagers)
  • Re: Migration from .NET CF 1 to .NET CF 2
    ... I'm trying to compile using VS 2005 beta 2. ... > Best regards, ... >> D. De Santis ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Error message when using OpenDocumentFile on read-only files
    ... support and multiple documents. ... When I compile this application (nothing ... >> Best regards ...
    (microsoft.public.vc.mfc.docview)