Re: How to read large files with VC6
- From: "LM" <sala.nimi@xxxxxxxx>
- Date: 6 Nov 2005 11:01:16 -0800
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.
.
- References:
- How to read large files with VC6
- From: LM
- Re: How to read large files with VC6
- From: Alex Blekhman
- How to read large files with VC6
- Prev by Date: Re: How to read large files with VC6
- Next by Date: Re: How to read large files with VC6
- Previous by thread: Re: How to read large files with VC6
- Next by thread: Re: How to read large files with VC6
- Index(es):
Relevant Pages
|