---
name: "GetFileSize"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/GetFileSize"
---

# GetFileSize(3w)

## NAME

**GetFileSize** (KERNEL32.@)

## SYNOPSIS

DWORD GetFileSize\
  (\
   HANDLE  *hFile*,\
   LPDWORD *filesizehigh*\
  )

## DESCRIPTION

Retrieve the size of a file.

## PARAMS

*hFile* **\[In\]**  File to retrieve size of.

*filesizehigh* **\[Out\]**  On return, the high bits of the file size.

## RETURNS

**Success:** The low bits of the file size.

**Failure:** **INVALID\_FILE\_SIZE**. As this is could also be a success value, check **[GetLastError(3w)](/GetLastError/3w.md)** for values other than **ERROR\_SUCCESS**.

## IMPLEMENTATION

Declared in **"winbase.h"**.

Implemented in **"dlls/kernel32/file.c"**.

Debug channel **"file"**.
