NtCancelWaitCompletionPacket - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTIOAPI_H
//
// Wait completion packet
//
#if (PHNT_VERSION >= PHNT_WINDOWS_8)

NTSYSCALLAPI
NTSTATUS
NTAPI
NtCancelWaitCompletionPacket(
    _In_ HANDLE WaitCompletionPacketHandle,
    _In_ BOOLEAN RemoveSignaledPacket
    );

#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwCancelWaitCompletionPacket(
    _In_ HANDLE WaitCompletionPacketHandle,
    _In_ BOOLEAN RemoveSignaledPacket
    );

#endif

View code on GitHub
NTSTATUS NtCancelWaitCompletionPacket (
    _In_ HANDLE WaitCompletionPacketHandle,
    _In_ BOOLEAN RemoveSignaledPacket
    )
View the official Win32 development documentation

NtDoc

This function is documented in Windows SDK.

Win32 development documentation (ntcancelwaitcompletionpacket)

NtCancelWaitCompletionPacket function

Cancels an active wait completion association if it has not been picked up from the completion port.

Parameters

WaitCompletionPacketHandle [in]

A handle to a wait completion packet.

RemoveSignaledPacket [in]

a boolean which determines whether this function will attempt to cancel a packet from an IO completion object queue.

Return value

An NTSTATUS code. For more information, see Using NTSTATUS values.

Value Description
STATUS_SUCCESS Success
STATUS_PENDING The wait completion may be pending and the packet cannot be immediately reused.
STATUS_CANCELLED The packet has already been completed or if has never been associated.

Remarks

This function has no associated import library or header file; you must call it using the LoadLibrary and GetProcAddress functions. The API is exported from ntdll.dll.

Requirements

Requirement Value
DLL ntdll.dll