Connecting Tech Pros Worldwide Help | Site Map

Handling large files > 4 GB

  #1  
Old July 22nd, 2005, 03:05 PM
Michael
Guest
 
Posts: n/a
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)
  #2  
Old July 22nd, 2005, 03:06 PM
Pete C.
Guest
 
Posts: n/a

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


  #3  
Old July 22nd, 2005, 04:16 PM
Michael
Guest
 
Posts: n/a

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
  #4  
Old July 22nd, 2005, 04:17 PM
Pete C.
Guest
 
Posts: n/a

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