NtCreateEventPair - 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 NtCreateEventPair routine creates an event pair object and opens a handle to the object with the specified desired access.
 *
 * \remark Event Pairs are used to communicate with protected subsystems (see Context Switches).
 * \param EventPairHandle A pointer to a variable that receives the event pair object handle.
 * \param DesiredAccess The access mask that specifies the requested access to the event pair object.
 * \param ObjectAttributes A pointer to an OBJECT_ATTRIBUTES structure that specifies the object attributes.
 * \return NTSTATUS Successful or errant status.
 * \remarks Legacy event-pair API. Unsupported service-table entries
 * return STATUS_NOT_IMPLEMENTED (0xC0000002) without performing the operation.
 * A declaration or ntdll export does not establish that event pairs are supported.
 * The native stub leaves EventPairHandle unchanged. With valid arguments, the
 * WoW64 thunk instead copies its zero-initialized local handle to the output even
 * on this failure; it can also fail earlier while converting ObjectAttributes.
 */
_Kernel_entry_
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCreateEventPair(
    _Out_ PHANDLE EventPairHandle,
    _In_ ACCESS_MASK DesiredAccess,
    _In_opt_ PCOBJECT_ATTRIBUTES ObjectAttributes
    );

#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

_Kernel_entry_
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwCreateEventPair(
    _Out_ PHANDLE EventPairHandle,
    _In_ ACCESS_MASK DesiredAccess,
    _In_opt_ PCOBJECT_ATTRIBUTES ObjectAttributes
    );

#endif

View code on GitHub

NtDoc

No description available.

NTinternals.net (undocumented.ntinternals.net)

EventPairHandle

Result handle to EventPair object.

DesiredAccess

Is defined as:

#define EVENT_PAIR_ALL_ACCESS ( STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE )

Documented by

See also