How to read large files with VC6



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.

.