Discussion:
bcc55 filesize limit (NTFS) ?
(too old to reply)
Chris K
2007-06-10 08:15:14 UTC
Permalink
Hi,

Is 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?

Chris.
Ed Mulroy
2007-06-10 14:48:05 UTC
Permalink
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 K
Is 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?
Chris K
2007-06-10 16:46:15 UTC
Permalink
I have the help files but I looked for NTFS and found very little
of this subject only in B5RTL.HLP.
Post by Ed Mulroy
http://msdn2.microsoft.com/en-us/library/aa365541.aspx
I think I can handle it with above info.
Post by Ed Mulroy
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...
Yes your right but my application don't create files of such large size.
It concerns Mpeg2 video streams and my application only reads
the headers for investigation.

Thanks for your help,

Chris.
Post by Ed Mulroy
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
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
B5RTL.ZIP B5MS.ZIP, B5SCL.ZIP and B5ERRS.ZIP
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 K
Is 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?
Ed Mulroy
2007-06-10 20:04:51 UTC
Permalink
Post by Chris K
I have the help files but I looked for NTFS and found very little
of this subject only in B5RTL.HLP.
NTFS is not pertainent to this issue. Whatever installable file systems are
used on whatever disk drives is handled inside of the operating system. The
Windows Application Programming Interface, Windows API, remains the same be
the drive NTFS, HPFS, FAT32, FAT16 or whatever.
Post by Chris K
...I think I can handle it with above info.
Excellent! I am glad that I could help.

. Ed
Post by Chris K
I have the help files but I looked for NTFS and found very little
of this subject only in B5RTL.HLP.
Post by Ed Mulroy
http://msdn2.microsoft.com/en-us/library/aa365541.aspx
I think I can handle it with above info.
Post by Ed Mulroy
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...
Yes your right but my application don't create files of such large size.
It concerns Mpeg2 video streams and my application only reads
the headers for investigation.
Thanks for your help,
Loading...