NtCreateKeyedEvent - NtDoc

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

NTSYSCALLAPI
NTSTATUS
NTAPI
NtCreateKeyedEvent(
    _Out_ PHANDLE KeyedEventHandle,
    _In_ ACCESS_MASK DesiredAccess,
    _In_opt_ PCOBJECT_ATTRIBUTES ObjectAttributes,
    _Reserved_ ULONG Flags
    );

#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwCreateKeyedEvent(
    _Out_ PHANDLE KeyedEventHandle,
    _In_ ACCESS_MASK DesiredAccess,
    _In_opt_ PCOBJECT_ATTRIBUTES ObjectAttributes,
    _Reserved_ ULONG Flags
    );

#endif

View code on GitHub

Synchronization object called KeyedEvent is available in Windows XP+ systems. It's useful when both (or more) threads have to wait for each other.

KeyedEventHandle

HANDLE to newly created KeyedEvent object.

DesiredAccess

The same values as for Event objects (typically EVENT_ALL_ACCESS).

ObjectAttributes

Optionally name of object.

Reserved

Have to be zero. Reserved for future use.

Documented by

See also