> > This is exactly one of my concerns... Does the Visual C++ compiler
have some support
File access is not a compiler issue, but a library and OS API issue. The
Win32 API does have support for 64-bit file access.
for 64-bit file access? Or in general which file systems really
support such a thing?
You need a 64 bit processor and operating system. Windows has not come
up out with a 64 bit operating system for x86, AMD recently cam out
with a 64 bit x86 baesd processor.
That is not true. The maximum file size an OS can handle is not related
to whether it runs on a 32-bit or 64-bit processor. Just like the good
old 16-bit OSes could handle files larger than 64Kbytes, 32-bit Windows
(and many other 32-bit OSes for that matter) can handle files larger
than 4GB. If you look for example at Win32 API function SetFilePointer()
you see it uses two (32-bit) signed long variables for the position, so
it can potentially address 2^63 bytes. More than seven years ago I wrote
software for the Windows NT platform that handled files that were larger
than 4GB. Only if you intend to load/map the complete file in memory a
64-bit OS would come in handy.
The real problem is that there is not standard way that is guaranteed to
work with large (>2 GByte) files. You will have to use platform specific
functions for that. If you intend to port your software to another
platform it is best write one or more wrappers around those platform
specific function calls. If you port to another platform you will only
have to rewrite those wrappers. As long as there are no platform or
compiler specific things on the interface of the wrappers, porting to
another platform should be relatively straightforward. When designing
the wrappers interface it might be wise to look at various OS API's to
see if there is a common denominator. I also recommend looking for
cross-platform libraries that wrap the OS API; it can save you a lot of
work. However if reading 16KByte chucks is all you ever going to need I
think the interface can be very straightforard and simple.
--
Peter van Merkerk
peter.van.merkerk(at)dse.nl