NtSetIoCompletion - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTIOAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetIoCompletion(
    _In_ HANDLE IoCompletionHandle,
    _In_opt_ PVOID KeyContext,
    _In_opt_ PVOID ApcContext,
    _In_ NTSTATUS IoStatus,
    _In_ ULONG_PTR IoStatusInformation
    );

#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwSetIoCompletion(
    _In_ HANDLE IoCompletionHandle,
    _In_opt_ PVOID KeyContext,
    _In_opt_ PVOID ApcContext,
    _In_ NTSTATUS IoStatus,
    _In_ ULONG_PTR IoStatusInformation
    );

#endif

View code on GitHub

Function NtSetIoCompletion increments pending IO counter in IO Completion Object. It can be used to manual finish IO operation.

IoCompletionHandle

HANDLE to IO Completion Object opened with IO_COMPLETION_MODIFY_STATE access.

CompletionKey

User's defined key received by NtRemoveIoCompletion function.

IoStatusBlock

IO result of call.

CompletionStatus

IO operation status.

NumberOfBytesTransferred

Number of bytes transferred in manually finished IO operation.

Documented by

See also