As you can see from its function prototype, lseek takes an int for the
position argument. The limit of 32 bits is 2Gig. To handle seeks where the
position is 2Gig or more from the current one, use the function Windows
provides.
SetFilePointer
The return values are the new position so a "tell" is achieved by calling it
for a relative move of zero bytes.
You can find information on that function in the Win32 help file. If you
did not get that when you were downloading the compiler then go here and get
it:
Help file updates for C++ Builder version 5
http://info.borland.com/techpubs/bcppbuilder/v5/updates/pro.html
As you are not using an IDE version of the compiler and do not have the VCL
you do not have use for all of those files. The ones which are likely to be
most useful for you are:
B5RTL.ZIP B5MS.ZIP, B5SCL.ZIP and B5ERRS.ZIP
A page on SetFilePointer is here:
http://msdn2.microsoft.com/en-us/library/aa365541.aspx
I want to strongly suggest why you are using a file of that size. One
programming glitch or one hard drive error could cause >4GB of data to be
lost or at least be suspect. Remember the saying about "putting all your
eggs in one basket".
. Ed
Post by Chris KIs it true that the file system of the bcc55 compiler is limited
to 2 of 4GB ?
I try to open() a file of more than 4GB this works but it seems
that lseek() and tell() fail.
It is a C source. Should I write it in C++ to get it to work?