fixed missing dereference and cleaned up code in NtCreateEvent

svn path=/trunk/; revision=895
This commit is contained in:
Phillip Susi 1999-12-20 20:49:27 +00:00
parent 13541861b1
commit d832a87f14

View file

@ -74,19 +74,13 @@ NTSTATUS STDCALL NtCreateEvent (OUT PHANDLE EventHandle,
IN BOOLEAN InitialState) IN BOOLEAN InitialState)
{ {
PKEVENT Event; PKEVENT Event;
DbgPrint( "Creating Event\n" );
Event = ObCreateObject(EventHandle, Event = ObCreateObject(EventHandle,
DesiredAccess, DesiredAccess,
ObjectAttributes, ObjectAttributes,
ExEventType); ExEventType);
if (ManualReset == TRUE) KeInitializeEvent( Event, ManualReset ? NotificationEvent : SynchronizationEvent, InitialState );
{ OnDereferenceObject( Event );
KeInitializeEvent(Event,NotificationEvent,InitialState);
}
else
{
KeInitializeEvent(Event,SynchronizationEvent,InitialState);
}
return(STATUS_SUCCESS); return(STATUS_SUCCESS);
} }