Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ZwSetEvent routine

The ZwSetEvent routine sets an event object to a Signaled state and attempts to satisfy as many waits as possible.

Syntax


NTSTATUS ZwSetEvent(
  _In_      HANDLE EventHandle,
  _Out_opt_ PLONG  PreviousState
);

Parameters

EventHandle [in]

A handle to an event object.

PreviousState [out, optional]

An optional pointer to a variable where the previous state of the event object is stored on output.

Return value

ZwSetEvent returns STATUS_SUCCESS or an appropriate error status. Possible error status codes include the following:

Return codeDescription
STATUS_ACCESS_DENIED

The caller did not have the required privileges to modify the event specified by the EventHandle parameter.

STATUS_INSUFFICIENT_RESOURCES

Resources required by this function could not be allocated.

STATUS_INVALID_HANDLE

The supplied EventHandle parameter was invalid.

 

Remarks

ZwSetEvent sets an event object to a Signaled state and attempts to satisfy as many waits as possible.

Note  If the call to the ZwSetEvent function occurs in user mode, you should use the name "NtSetEvent" instead of "ZwSetEvent".

Requirements

Target platform

Universal

Version

Available in Windows XP and later versions of Windows.

Header

Ntifs.h (include Ntifs.h)

Library

Ntoskrnl.lib

IRQL

PASSIVE_LEVEL

See also

IoCreateNotificationEvent
IoCreateSynchronizationEvent
KeClearEvent
KeResetEvent
KeSetEvent
KeWaitForSingleObject
ZwClose
ZwCreateEvent
ZwWaitForSingleObject

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft