NtOpenIoCompletion - NtDoc

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

/**
 * The NtOpenIoCompletion routine opens an existing I/O completion port object.
 *
 * \param[out] IoCompletionHandle Pointer to a variable that receives a handle to the I/O completion port.
 * \param[in] DesiredAccess The requested access to the object.
 * \param[in] ObjectAttributes Pointer to an OBJECT_ATTRIBUTES structure that specifies the name and other attributes.
 * \return NTSTATUS Successful or errant status.
 * \sa https://learn.microsoft.com/en-us/windows/win32/fileio/createiocompletionport
 */
NTSYSCALLAPI
NTSTATUS
NTAPI
NtOpenIoCompletion(
    _Out_ PHANDLE IoCompletionHandle,
    _In_ ACCESS_MASK DesiredAccess,
    _In_ PCOBJECT_ATTRIBUTES ObjectAttributes
    );

#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwOpenIoCompletion(
    _Out_ PHANDLE IoCompletionHandle,
    _In_ ACCESS_MASK DesiredAccess,
    _In_ PCOBJECT_ATTRIBUTES ObjectAttributes
    );

#endif

View code on GitHub

NtDoc

No description available.

NTinternals.net (undocumented.ntinternals.net)

Function NtOpenIoCompletion opens existing IO Completion Object. IO Completion must be created as named object.

IoCompletionHandle

Result of call - pointer to HANDLE value.

DesiredAccess

Can be one or combination of:

ObjectAttributes

Pointer to OBJECT_ATTRIBUTES structure containing valid IO Completion name.

Documented by

See also