大网数据广告活动
Windows 系统接口

NtAssociateWaitCompletionPacket function

· 52CE 我爱测

Creates a wait completion association for the target object.

Creates a wait completion association for the target object.

Syntax

NTSTATUS NtAssociateWaitCompletionPacket (
    _In_ HANDLE WaitCompletionPacketHandle,
    _In_ HANDLE IoCompletionHandle,
    _In_ HANDLE TargetObjectHandle,
    _In_opt_ PVOID KeyContext,
    _In_opt_ PVOID ApcContext,
    _In_ NTSTATUS IoStatus,
    _In_ ULONG_PTR IoStatusInformation,
    _Out_opt_ PBOOLEAN AlreadySignaled
    )

Parameters

WaitCompletionPacketHandle [in]

A handle to a wait completion packet which describes the association. This object must not be in use.

IoCompletionHandle [in]

A handle to an IO completion object which will receive a notification when the object becomes signaled.

TargetObjectHandle [in]

A handle to a waitable object for which notifications are to be received.

KeyContext [in]

Supplies the key context that is returned during a call to NtRemoveIoCompletion.

ApcContext [in]

The apc context that is returned during a call to NtRemoveIoCompletion.

IoStatus [in]

The IoStatus->Status data that is returned during a call to NtRemoveIoCompletion.

IoStatusInformation [in]

The IoStatus->Information data that is returned during a call to NtRemoveIoCompletion.

AlreadySignaled [out]

An optional pointer to a boolean variable that receives an indication of whether the target object was already signaled at the time of the association when this function succeeds.

Return value

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

Remarks

When the object is signaled, a packet is queued to the supplied completion port and the supplied values will be conveyed to a caller of NtRemoveIoCompletion. When the packet is picked up, the association must be reestablished by calling this function again. An error is returned if the wait completion packet is already in use for an association.

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

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 08/30/2023
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。