#ifndef _NTIOAPI_H
/**
* The NtCancelIoFileEx routine marks any outstanding I/O operations for the specified file handle.
*
* \param[in] FileHandle Handle to the file.
* \param[in, optional] IoRequestToCancel Pointer to an IO_STATUS_BLOCK structure that identifies the I/O request to cancel.
* \param[out] IoStatusBlock Pointer to an IO_STATUS_BLOCK structure.
* \return NTSTATUS Successful or errant status.
* \sa https://learn.microsoft.com/en-us/windows/win32/api/ioapiset/nf-ioapiet-cancelioex
* \remarks A non-NULL IoRequestToCancel identifies the original request by its IO_STATUS_BLOCK address; NULL selects
* matching requests without that address filter. The helper searches the current process's file and
* thread request lists and returns STATUS_NOT_FOUND when nothing matches. Cancellation can race normal
* completion: retain the original request buffers and status block until that request's completion is
* observed. The separate cancellation IoStatusBlock has Information = 0, not a count of canceled requests.
*/
_Kernel_entry_
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCancelIoFileEx(
_In_ HANDLE FileHandle,
_In_opt_ PIO_STATUS_BLOCK IoRequestToCancel,
_Out_ PIO_STATUS_BLOCK IoStatusBlock
);
View code on GitHub#ifndef _NTZWAPI_H
_Kernel_entry_
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwCancelIoFileEx(
_In_ HANDLE FileHandle,
_In_opt_ PIO_STATUS_BLOCK IoRequestToCancel,
_Out_ PIO_STATUS_BLOCK IoStatusBlock
);
View code on GitHubNo description available.