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

# NtFsControlFile(3w)

## NAME

**NtFsControlFile** (NTDLL.@)

## SYNOPSIS

NTSTATUS NtFsControlFile\
  (\
   HANDLE           *handle*,\
   HANDLE           *event*,\
   PIO\_APC\_ROUTINE  *apc*,\
   PVOID            *apc\_context*,\
   PIO\_STATUS\_BLOCK *io*,\
   ULONG            *code*,\
   PVOID            *in\_buffer*,\
   ULONG            *in\_size*,\
   PVOID            *out\_buffer*,\
   ULONG            *out\_size*\
  )

## DESCRIPTION

Perform a file system control operation on an open file *handle*.

## PARAMS

*handle* **\[In\]**  Handle returned from **ZwOpenFile(3w)** or **ZwCreateFile(3w)**.

*event* **\[In\]**  Event to signal upon completion (or **NULL**).

*apc* **\[In\]**  Callback to call upon completion (or **NULL**).

*apc\_context* **\[In\]**  Context for ApcRoutine (or **NULL**).

*io* **\[Out\]**  Receives information about the operation on return.

*code* **\[In\]**  Control *code* for the operation to perform.

*in\_buffer* **\[In\]**  Source for any input data required (or **NULL**).

*in\_size* **\[In\]**  Size of InputBuffer.

*out\_buffer* **\[Out\]**  Source for any output data returned (or **NULL**).

*out\_size* **\[In\]**  Size of OutputBuffer.

## RETURNS

**Success:** **0.** IoStatusBlock is updated.

**Failure:** An **NTSTATUS** error *code* describing the error.

## IMPLEMENTATION

Declared in **"winternl.h"**.

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

Debug channel **"ntdll"**.
