Handling large files > 4 GB

M

Michael

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)
 
P

Pete C.

Michael said:
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.
<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
 
M

Michael

Pete C. said:
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

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
 
P

Pete C.

Michael said:
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

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

- Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top