Re: How to read large files with VC6
- From: "Alex Blekhman" <tkfx.N05P4M@xxxxxxxxx>
- Date: Sun, 6 Nov 2005 19:56:32 +0200
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.
.
- Follow-Ups:
- Re: How to read large files with VC6
- From: LM
- Re: How to read large files with VC6
- From: LM
- Re: How to read large files with VC6
- References:
- How to read large files with VC6
- From: LM
- How to read large files with VC6
- Prev by Date: How to read large files with VC6
- Next by Date: Re: How to read large files with VC6
- Previous by thread: How to read large files with VC6
- Next by thread: Re: How to read large files with VC6
- Index(es):
Relevant Pages
|
Loading