Article View: borland.public.cppbuilder.nativeapi
Article #2026Re: 32 bit File O and 64 Bit File IO
From: Bob Gonder
Date: Fri, 11 May 2007 14:12
Date: Fri, 11 May 2007 14:12
29 lines
1975 bytes
1975 bytes
Colin B Maharaj wrote: >1. Does the FileWrite routine writes pass 2 or 4 GIGs nowhere do I see >that FileWrite is 64 bit based? Should not matter unless you are trying to write more than 4 GB in one call. (Notice that there is _no_ position argument, which would be the limiting file-size factor.) The limiting factor is the OS. You can use files as large as the underlying OS allows. >2. Similarly does the FileRead routine work pass the 2 or 4 GIGs point? Again, there is no positioning argument, so the size of the file does not matter. Only the size of your read matters. > It is clear that FileSeek is both 64 and 32 bit based. So >doe it mean that most of my recoding will be based on >using a 64 bit file pointer for seek operations and thats it!! (?) If it does use 64bit integers, then yes. (The 32/64 overload is seen on the Delphi, but not C++ help) Otherwise, you might look to the WinApi CreateFile() ReadFile() WriteFile() SetFilePointer() uses 2-32bit integers for a 64bit offset. SetFilePointerEx() uses 1-64bit integer.
Technical Details
Message-ID:
<a1t8439ecms6dam3jiasc4nm3j4tbps17d@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<46443D35.2050709@myhost.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,63387be217b705f8 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: 32 bit File O and 64 Bit File IO Date: Fri, 11 May 2007 07:12:26 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <a1t8439ecms6dam3jiasc4nm3j4tbps17d@4ax.com> References: <46443D35.2050709@myhost.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 69.69.85.213 X-Trace: newsgroups.borland.com 1178892744 69.69.85.213 (11 May 2007 07:12:24 -0700) Lines: 32 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail