large file support in Win32
ryan at malayter.com
Thu Sep 22 14:45:54 CEST 2005
Looking at the PLatform SDK documentation, it isn't clear that
GetFileSize will fail when a file is > 4 GB. Maybe I'm reading it
incorrectly, and it is certainly very vague, but nowhere does it say
"if a file is greater than 4 GB, INVALID_FILE_SIZE will be returned".
It only sayd about "if the function fails", not that a file size > 4GB
will cause it to fail.
I suppose the only thing to do would be to pass a lpFileSizeHigh value
and test combinations with GetLastError to see what the function's
behavior really is.
On 9/22/05, Werner Koch <wk at gnupg.org> wrote:
> On Wed, 21 Sep 2005 22:47:10 -0500, Ryan Malayter said:
> > 09/18/2005 05:44 AM 45,284,360,192 myfile.bkf
> > :literal data packet:
> > mode b (62), created 1127307875, name="myfile.bkf",
> > raw data: 2334687232 bytes
> This number is exactly the remainder of 45284360192 / 2^32.
> Thus my conclusion is that GetFizeSize does not return a proper error
> as ist should according to the documentation. Maybe this did not
> happen with W98.
> The easiest way of fixing it would be using GetFileSizeEx but that
> function is only available with W2000 Professional. So either I try to
> figure out why GetFileSize does not return an error anymore or I need
> to dynamically load GetFileSizeEx; did the later at other places too.
> Many thanks for running this test.
All problems can be solved by diplomacy, but violence and treachery
are equally effective, and more fun.
More information about the Gnupg-devel