NtWaitForKeyedEvent - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTEXAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)

/**
 *  The NtWaitForKeyedEvent routine waits for a keyed event to be released with the specified key value.
 *
 * \param KeyedEventHandle Optional handle to the keyed event object. If NULL, the default keyed event is used.
 * \param KeyValue The key value to wait for.
 * \param Alertable Specifies whether the call is alertable (can be interrupted by APCs).
 * \param Timeout Optional pointer to a timeout value (in 100-nanosecond intervals). If NULL, waits indefinitely.
 * \return NTSTATUS Successful or errant status.
 */
NTSYSCALLAPI
NTSTATUS
NTAPI
NtWaitForKeyedEvent(
    _In_opt_ HANDLE KeyedEventHandle,
    _In_ PVOID KeyValue,
    _In_ BOOLEAN Alertable,
    _In_opt_ PLARGE_INTEGER Timeout
    );

#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwWaitForKeyedEvent(
    _In_opt_ HANDLE KeyedEventHandle,
    _In_ PVOID KeyValue,
    _In_ BOOLEAN Alertable,
    _In_opt_ PLARGE_INTEGER Timeout
    );

#endif

View code on GitHub

NtDoc

No description available.

NTinternals.net (undocumented.ntinternals.net)

Function with similar functionality as NtReleaseKeyedEvent. In my opinion it is not needed and exists only for future vision of KeyedEvent objects or just as a mistake.

KeyedEventHandle

HANDLE for previously opened KeyedEvent object.

Key

Value to wait for, must have lowest bit clear.

Alertable

If set, waiting can be broken by alerting thread.

Timeout

Optionally pointer for timing out value.

Documented by

See also