Retrieves the size of the specified file.
Syntax
BOOL WINAPI GetFileSizeEx(
__in HANDLE hFile,
__out PLARGE_INTEGER lpFileSize
);
Parameters
- hFile [in]
-
A handle to the file. 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]
-
A pointer to a
LARGE_INTEGER structure that receives the file size, in bytes.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call
GetLastError.
Remarks
Transacted Operations: If there is a transaction bound to the file handle, then the function returns information for the isolated file view.
Requirements
| Minimum supported client | Windows 2000 Professional |
| Minimum supported server | Windows 2000 Server |
| Header | WinBase.h (include Windows.h) |
| Library | Kernel32.lib |
| DLL | Kernel32.dll |
See Also
File Management Functions
LARGE_INTEGER
Send comments about this topic to Microsoft
Build date: 11/20/2008