how to operating a big file(larger than 4.7GB)  
Author Message
LWPittman





PostPosted: Sat Oct 25 04:56:19 CDT 2003 Top

MFC >> how to operating a big file(larger than 4.7GB)

the "CFile" class seems to have some problems,
especially the file seek, the seek pointer is
only 32-bits,so I can't seek to a position after
4.7GB. Does anyone encounter the same problem
like me?please tell me how you handled it.
thank you!

Visual Studio146  
 
 
David





PostPosted: Sat Oct 25 04:56:19 CDT 2003 Top

MFC >> how to operating a big file(larger than 4.7GB) >the "CFile" class seems to have some problems,
>especially the file seek, the seek pointer is
>only 32-bits,so I can't seek to a position after
>4.7GB.

Nicholas,

In newer versions of MFC, the Seek parameter is defined as LONGLONG. I
seem to recall that earlier versions may have had another method -
something like Seek64 maybe? If I'm mistaken, you could take a look at
the CFile source implementation and expand on that with your own
method - I think it defers down to the underlying Win32 API that does
support longer values.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
 
 
Nicholas





PostPosted: Sun Oct 26 01:19:58 CDT 2003 Top

MFC >> how to operating a big file(larger than 4.7GB) thank you!
I've solved the problem by your latter way(win32 api).

>-----Original Message-----
>>the "CFile" class seems to have some problems,
>>especially the file seek, the seek pointer is
>>only 32-bits,so I can't seek to a position after
>>4.7GB.
>
>Nicholas,
>
>In newer versions of MFC, the Seek parameter is defined
as LONGLONG. I
>seem to recall that earlier versions may have had another
method -
>something like Seek64 maybe? If I'm mistaken, you could
take a look at
>the CFile source implementation and expand on that with
your own
>method - I think it defers down to the underlying Win32
API that does
>support longer values.
>
>Dave
>--
>MVP VC++ FAQ: http://www.mvps.org/vcfaq
>.
>