Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.48 KB

GetFileSize.md

File metadata and controls

54 lines (37 loc) · 1.48 KB

Home

Function name : GetFileSize

Group: File System - Library: kernel32


Retrieves the size of a specified file.


Code examples:

Using GetFileSize
Using InternetSetFilePointer when resuming interrupted download from the Internet
Passing data records between VFP applications via the Clipboard

Declaration:

DWORD GetFileSize(
  HANDLE hFile,           // handle to file
  LPDWORD lpFileSizeHigh  // high-order word of file size
);  

FoxPro declaration:

DECLARE INTEGER GetFileSize IN kernel32;
	INTEGER   hFile,;
	INTEGER @ lpFileSizeHigh  

Parameters:

hFile [in] Handle to the file whose size is to be returned.

lpFileSizeHigh [out] Pointer to the variable where the high-order word of the file size is returned.


Return value:

If the function succeeds, the return value is the low-order doubleword of the file size, and, if lpFileSizeHigh is non-NULL, the function puts the high-order doubleword of the file size into the variable pointed to by that parameter.


Comments:

This function stores the file size in two DWORD values. To retrieve a file size stored in a LARGE_INTEGER structure, use the GetFileSizeEx function (WinNT only).