I am writing a program that must list and manipulate a large file filesise.
In the past I have used the Adir() or api calls of FindFirst and
FindNext to retrieve the information.
Now, I have run into a problem for the first time. Since I need to list
in a table field, large numbers that exceed the capacity of a 4 byte
integer.
When I test using large > 4 gig, ".avi" file, the values obtained by all
the functions I have tried are incorrect, showing - 2 gig or some other
incorrect value.
I know this is because the number exceeds the storage type capacity.
I have used 8 byte doubles but the routine I have still will not work.
I have tried using the following API call in Kernel32 GetFileSizeEx
BOOL GetFileSizeEx(
HANDLE hFile,
PLARGE_INTEGER lpFileSize
);
Parameters
hFile
[in] Handle to the file whose size is to be returned. The handle must
have been created with either the GENERIC_READ or GENERIC_WRITE access
right. For more information, see File Security and Access Rights.
lpFileSize
[out] Pointer to a LARGE_INTEGER structure that receives the file size.
Return Values
If the function succeeds, the return value is nonzero.
But I cannot get it to work in either VFP8 or in a C DLL I wrote.
Can anyone help with a routine to get these large files sizes into a
program.
There must be a way since many commercial programs do this.
Any and all help appreciated.