473,586 Members | 2,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.yahNN oo@com (NOSPAM: remove NN's and swap @ & . to e-mail
me)
Jul 22 '05 #1
3 3165
Michael wrote:
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.program mer.win32.

- Pete
Jul 22 '05 #2
"Pete C." <x@x.x> wrote in message news:<q7******* **********@news read1.news.pas. earthlink.net>. ..

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.program mer.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
Jul 22 '05 #3
Michael wrote:
"Pete C." <x@x.x> wrote in message
news:<q7******* **********@news read1.news.pas. earthlink.net>. ..

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.program mer.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


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

- Pete
Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
8449
by: Rolf Schroedter | last post by:
(Sorry for cross-posting). I need to access large files > 2GByte (Linux, WinXP/NTFS) using the standard C-library calls. Till today I thought I know how to do it, namely for Win32: Use open(), read(), _itelli64(), _lseeki64() with type __int64 Linux/Cygwin: #define _FILE_OFFSET_BITS 64 Use open(), read(), lseek() with type off_t
34
2218
by: rawCoder | last post by:
I have read that Exception Handling is expensive performance wise ( other than Throw ) , but exactly how ? Please consider the following example ... ////////////////// Code Block 1 ////////////////////////////////// Try { for ( ... ){// Code that might throw exception} }catch(...){}...
6
4830
by: Thomas Due | last post by:
Hi, I am writing an ASP.NET project where I allow users to upload files to the server. I have changed to web.config to allow a total file size of 100MB. My problem is that if the total file size exceed this amount the page simply stops works, and I get a "Server unreachable" error. Is there any way to handle this, so I am able to present...
1
1168
by: howachen | last post by:
I wan to check the well-formness of a very large XML file (a few GB), I want to know if xmlwf can handle this job for me? Or any other tool(s) I should not miss. Thanks.
26
9290
by: myeates | last post by:
Hi Anyone ever done this? It looks like Python2.4 won't take a length arg Mathew
1
2421
by: Max | last post by:
I am using XmlSerializer to deserialize XML, and sometimes have to deal with legacy files with slight differences, for example "yes" where "Yes" is expected, i.e. Expected: &lt;Enabled&gt;yes&lt;/Enabled&gt; Actual: &lt;Enabled&gt;Yes&lt;/Enabled&gt; This causes an "InvalidOperationException" and terminates the deserialization. I would prefer my code to be able...
2
3193
by: robert | last post by:
Somebody who uses my app gets a error : os.stat('/path/filename') OSError: Value too large for defined data type: '/path/filename' on a big file >4GB ( Python 2.4.4 / Linux )
4
5084
by: =?Utf-8?B?U2VyZ2Vp?= | last post by:
Dear staff Can I get your assistance with \3GB (LARGEADDRESSAWARE) switch in mixed mode process built by VS 2008, please? I have a mixed mode application: C# GUI calling native C++ DLL through managed C++ wrapper. And I want to give the native C++ code access to large (>2G) addresses; but (if it’s possible) I do not want the managed code...
2
2313
by: MikeB | last post by:
Hi I hope that this is the correct place to post this question. I'm looking at developing an application which will enable me to import and process some data that is made available to me as XML. One complication is that the providers of the data have published two different schema versions. Whilst effectively describing the same data,...
0
7912
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8216
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6614
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3865
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1449
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.