Skip to content

Latest commit

 

History

History
156 lines (124 loc) · 3.44 KB

nf-fileapi-getfilesizeex.md

File metadata and controls

156 lines (124 loc) · 3.44 KB
UIDtitledescriptionhelpviewer_keywordsold-locationtech.rootms.assetidms.datems.keywordsreq.headerreq.include-headerreq.target-typereq.target-min-winverclntreq.target-min-winversvrreq.kmdf-verreq.umdf-verreq.ddi-compliancereq.unicode-ansireq.idlreq.max-supportreq.namespacereq.assemblyreq.type-libraryreq.libreq.dllreq.irqltargetosreq.typenamesreq.redistms.customf1_keywordsdev_langstopic_typeapi_typeapi_locationapi_name
NF:fileapi.GetFileSizeEx
GetFileSizeEx function (fileapi.h)
Retrieves the size of the specified file.
GetFileSizeEx
GetFileSizeEx function [Files]
_win32_getfilesizeex
base.getfilesizeex
fileapi/GetFileSizeEx
fs.getfilesizeex
winbase/GetFileSizeEx
fs\getfilesizeex.htm
fs
782457bc-8f37-4eec-8ff3-b148fd0a7345
12/05/2018
GetFileSizeEx, GetFileSizeEx function [Files], _win32_getfilesizeex, base.getfilesizeex, fileapi/GetFileSizeEx, fs.getfilesizeex, winbase/GetFileSizeEx
fileapi.h
Windows.h
Windows
Windows XP [desktop apps \| UWP apps]
Windows Server 2003 [desktop apps \| UWP apps]
Kernel32.lib
Kernel32.dll
Windows
19H1
GetFileSizeEx
fileapi/GetFileSizeEx
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
API-MS-Win-Core-File-l1-1-0.dll
KernelBase.dll
API-MS-Win-Core-File-l1-2-0.dll
API-MS-Win-Core-File-l1-2-1.dll
API-MS-Win-Core-File-l1-2-2.dll
API-MS-Win-DownLevel-Kernel32-l1-1-0.dll
MinKernelBase.dll
GetFileSizeEx

GetFileSizeEx function

-description

Retrieves the size of the specified file.

-parameters

-param hFile [in]

A handle to the file. The handle must have been created with the FILE_READ_ATTRIBUTES access right or equivalent, or the caller must have sufficient permission on the directory that contains the file. For more information, see File Security and Access Rights.

-param lpFileSize [out]

A pointer to a LARGE_INTEGER structure that receives the file size, in bytes.

-returns

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.

Windows Store apps:  GetFileSizeEx is not supported. Use GetFileInformationByHandleEx.

In Windows 8 and Windows Server 2012, this function is supported by the following technologies.

TechnologySupported
Server Message Block (SMB) 3.0 protocol Yes
SMB 3.0 Transparent Failover (TFO) Yes
SMB 3.0 with Scale-out File Shares (SO) Yes
Cluster Shared Volume File System (CsvFS) Yes
Resilient File System (ReFS) Yes

-see-also

File Management Functions

LARGE_INTEGER

close