Connecting Tech Pros Worldwide Forums | Help | Site Map

Handling large files > 4 GB

Michael
Guest
 
Posts: n/a
#1: Jul 22 '05
X-Replace-Address

Hello,

I am trying to write a program at work for reading/writing files
larger than 4 GB. I know that Windows supports files that big but I
have not been able to get my program to write past the 4 gig boundary.


Some solutions that I have tried:
* standard library: fstream/write
* MS's CreateFile()/WriteFile()
* fopen/fwrite


I found a page http://www.ece.utexas.edu/~luo/linux_lfs.html that
describes large file support for Linux. Is there an equivalent under
Windows?

I would prefer a portable solution, but will settle for anything that
will work on Windows 2000. BTW, I am using Borland C++ Builder 6.0
for my compiler.

Thanks in advance for any help,
Michael

mwithNNam.yahNNoo@com (NOSPAM: remove NN's and swap @ & . to e-mail
me)

Pete C.
Guest
 
Posts: n/a
#2: Jul 22 '05

re: Handling large files > 4 GB


Michael wrote:[color=blue]
> X-Replace-Address
>
> Hello,
>
> I am trying to write a program at work for reading/writing files
> larger than 4 GB. I know that Windows supports files that big but I
> have not been able to get my program to write past the 4 gig boundary.
>[/color]
<snip>

Standard C++ (the topic of this group) does not define any file size limits,
so you need to ask in a group for your platform. In your case,
comp.os.ms-windows.programmer.win32.

- Pete


Michael
Guest
 
Posts: n/a
#3: Jul 22 '05

re: Handling large files > 4 GB


"Pete C." <x@x.x> wrote in message news:<q75Cc.14673$Wr.3269@newsread1.news.pas.earth link.net>...[color=blue]
>
> Standard C++ (the topic of this group) does not define any file size limits,
> so you need to ask in a group for your platform. In your case,
> comp.os.ms-windows.programmer.win32.
>
> - Pete[/color]

Thank you for your reply. So that means that streampos's size (the
type used by tellg() and seekg()) is defined by the implementation,
not the Standard?

Sorry for being off topic,
Michael
Pete C.
Guest
 
Posts: n/a
#4: Jul 22 '05

re: Handling large files > 4 GB


Michael wrote:[color=blue]
> "Pete C." <x@x.x> wrote in message
> news:<q75Cc.14673$Wr.3269@newsread1.news.pas.earth link.net>...[color=green]
>>
>> Standard C++ (the topic of this group) does not define any file size
>> limits, so you need to ask in a group for your platform. In your
>> case, comp.os.ms-windows.programmer.win32.
>>
>> - Pete[/color]
>
> Thank you for your reply. So that means that streampos's size (the
> type used by tellg() and seekg()) is defined by the implementation,
> not the Standard?
>
> Sorry for being off topic,
> Michael[/color]

Yes, it's implementation defined. Note that questions about whether some is
or not /is/ on-topic. :)

- Pete


Closed Thread