Connecting Tech Pros Worldwide Help | Site Map

Handling large files > 4 GB

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 22nd, 2005, 02:05 PM
Michael
Guest
 
Posts: n/a
Default Handling large files > 4 GB

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, 02:06 PM
Pete C.
Guest
 
Posts: n/a
Default 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, 03:16 PM
Michael
Guest
 
Posts: n/a
Default 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, 03:17 PM
Pete C.
Guest
 
Posts: n/a
Default 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


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.