LONG
KeReadStateEvent(
IN PKEVENT Event
);
KeReadStateEvent returns the current state, Signaled or Not-Signaled, of a given event object.
If the current state of the event object is Signaled, a nonzero value is returned. Otherwise, zero is returned.
It is also possible to read the state of an event from a driver’s interrupt service routine at DIRQL, if the following conditions are met: the driver’s event object is resident (probably in its device extension), and any other function that accesses the event synchronizes its access with the ISR.
Callers of KeReadStateEvent must be running at IRQL <= DISPATCH_LEVEL.