Kernel32GetFileSizeEx(SafeFileHandle, Int64) Method
Retrieves the size of the specified file.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", ExactSpelling = true, SetLastError = true)]
public static bool GetFileSizeEx(
SafeFileHandle hFile,
out long fileSize
)
<DllImportAttribute("Kernel32.dll", ExactSpelling := true, SetLastError := true>]
Public Shared Function GetFileSizeEx (
hFile As SafeFileHandle,
<OutAttribute> ByRef fileSize As Long
) As Boolean
Dim hFile As SafeFileHandle
Dim fileSize As Long
Dim returnValue As Boolean
returnValue = Kernel32.GetFileSizeEx(hFile,
fileSize)
public:
[DllImportAttribute(L"Kernel32.dll", ExactSpelling = true, SetLastError = true)]
static bool GetFileSizeEx(
[InAttribute] SafeFileHandle^ hFile,
[OutAttribute] long long% fileSize
)
[<DllImportAttribute("Kernel32.dll", ExactSpelling = true, SetLastError = true)>]
static member GetFileSizeEx :
hFile : SafeFileHandle *
fileSize : int64 byref -> bool
No code example is currently available or this language may not be supported.
- hFile SafeFileHandle
-
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.
- fileSize Int64
-
A Int64 that receives the file size, in bytes.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.