I am using WIN32_FIND_DATA to get nFileSizeHigh & nFileSizeLow for files. All fine and good but once I get passed 4.3 gigs its wrong, to be expected though unless I play by ms rules. The formula they provide is
(nFileSizeHigh * (MAXDWORD+1)) + nFileSizeLow
thats where my problem is. it used to look like
(nFileSizeHigh * MAXDWORD) + nFileSizeLow
so on windows xp if I use what it was my file sizes for over 4.3 gigs are wrong when matching up to what windows says about it but I can't seem to figure out ho to use MAXDWORD+1 since it pops back to 0 if I do.
Any help would be great.
(nFileSizeHigh * (MAXDWORD+1)) + nFileSizeLow
thats where my problem is. it used to look like
(nFileSizeHigh * MAXDWORD) + nFileSizeLow
so on windows xp if I use what it was my file sizes for over 4.3 gigs are wrong when matching up to what windows says about it but I can't seem to figure out ho to use MAXDWORD+1 since it pops back to 0 if I do.
Any help would be great.
The original Windows API documentation and SDK had an error in it. The (nFileSizeHigh * (MAXDWORD+1)) + nFileSizeLow is the right formula. To use it just multiply nFileSizeHigh by MAXDWORD and add nFileSizeHigh to the result. So the formula becomes (basic algebra)
(nFileSizeHigh * MAXDWORD) + nFileSizeHigh + nFileSizeLow
(nFileSizeHigh * MAXDWORD) + nFileSizeHigh + nFileSizeLow