NtCancelWaitCompletionPacket function

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

Syntax

NTSTATUS NtCancelWaitCompletionPacket (
    _In_ HANDLE WaitCompletionPacketHandle,
    _In_ BOOLEAN RemoveSignaledPacket
    )

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