#ifndef _NTIOAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
NtFsControlFile(
_In_ HANDLE FileHandle,
_In_opt_ HANDLE Event,
_In_opt_ PIO_APC_ROUTINE ApcRoutine,
_In_opt_ PVOID ApcContext,
_Out_ PIO_STATUS_BLOCK IoStatusBlock,
_In_ ULONG FsControlCode,
_In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer,
_In_ ULONG InputBufferLength,
_Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer,
_In_ ULONG OutputBufferLength
);
View code on GitHub
#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwFsControlFile(
_In_ HANDLE FileHandle,
_In_opt_ HANDLE Event,
_In_opt_ PIO_APC_ROUTINE ApcRoutine,
_In_opt_ PVOID ApcContext,
_Out_ PIO_STATUS_BLOCK IoStatusBlock,
_In_ ULONG FsControlCode,
_In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer,
_In_ ULONG InputBufferLength,
_Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer,
_In_ ULONG OutputBufferLength
);
View code on GitHub
This function is documented in Windows Driver Kit here and here.
Function NtFsControlFile
sends FSCTL_*
code to File System Device Driver. See also description of NtDeviceIoControlFile
function.
HANDLE
to File System Device Object opened as a file.
Optional HANDLE
to Event Object.
Optional pointer to user's APC Routine.
Parameter for ApcRoutine
.
IO result of call.
Control Code typically defined as FSCTL_*
.
User's allocated buffer contains input data.
Length of InputBuffer
, in bytes.
User's allocated buffer for results of call.
Length of OutputBuffer
, in bytes.