ReactOS  0.4.14-dev-815-ge410a12
ioevent.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
Include dependency graph for ioevent.c:

Go to the source code of this file.

Functions

PKEVENT NTAPI IopCreateEvent (IN PUNICODE_STRING EventName, IN PHANDLE EventHandle, IN EVENT_TYPE Type)
 
PKEVENT NTAPI IoCreateNotificationEvent (IN PUNICODE_STRING EventName, IN PHANDLE EventHandle)
 
PKEVENT NTAPI IoCreateSynchronizationEvent (IN PUNICODE_STRING EventName, IN PHANDLE EventHandle)
 

Function Documentation

◆ IoCreateNotificationEvent()

PKEVENT NTAPI IoCreateNotificationEvent ( IN PUNICODE_STRING  EventName,
IN PHANDLE  EventHandle 
)

Definition at line 70 of file ioevent.c.

72 {
73  /* Call the internal API */
74  return IopCreateEvent(EventName, EventHandle, NotificationEvent);
75 }
PKEVENT NTAPI IopCreateEvent(IN PUNICODE_STRING EventName, IN PHANDLE EventHandle, IN EVENT_TYPE Type)
Definition: ioevent.c:19
_Out_ PHANDLE EventHandle
Definition: iofuncs.h:855

Referenced by START_TEST().

◆ IoCreateSynchronizationEvent()

PKEVENT NTAPI IoCreateSynchronizationEvent ( IN PUNICODE_STRING  EventName,
IN PHANDLE  EventHandle 
)

Definition at line 82 of file ioevent.c.

84 {
85  /* Call the internal API */
87 }
PKEVENT NTAPI IopCreateEvent(IN PUNICODE_STRING EventName, IN PHANDLE EventHandle, IN EVENT_TYPE Type)
Definition: ioevent.c:19
_Out_ PHANDLE EventHandle
Definition: iofuncs.h:855

Referenced by CdRomCreateNamedEvent(), InitializeGlobalData(), and START_TEST().

◆ IopCreateEvent()

PKEVENT NTAPI IopCreateEvent ( IN PUNICODE_STRING  EventName,
IN PHANDLE  EventHandle,
IN EVENT_TYPE  Type 
)

Definition at line 19 of file ioevent.c.

22 {
24  PKEVENT Event;
25  HANDLE Handle;
27  PAGED_CODE();
28 
29  /* Initialize the object attributes */
31  EventName,
33  NULL,
34  NULL);
35 
36  /* Create the event */
37  Status = ZwCreateEvent(&Handle,
40  Type,
41  TRUE);
42  if (!NT_SUCCESS(Status)) return NULL;
43 
44  /* Get a handle to it */
46  0,
48  KernelMode,
49  (PVOID*)&Event,
50  NULL);
51  if (!NT_SUCCESS(Status))
52  {
53  ZwClose(Handle);
54  return NULL;
55  }
56 
57  /* Dereference the extra count, and return the handle */
60  return Event;
61 }
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
#define TRUE
Definition: types.h:120
Type
Definition: Type.h:6
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
LONG NTSTATUS
Definition: precomp.h:26
VOID NTAPI ObDereferenceObject(IN PVOID Object)
Definition: obref.c:375
POBJECT_TYPE ExEventObjectType
Definition: event.c:22
#define PAGED_CODE()
Definition: video.h:57
#define OBJ_OPENIF
Definition: winternl.h:229
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
Definition: obref.c:496
#define EVENT_ALL_ACCESS
Definition: isotest.c:82
_In_ PVOID _In_ ULONG Event
Definition: iotypes.h:435
smooth NULL
Definition: ftsmooth.c:416
_In_ HANDLE Handle
Definition: extypes.h:390
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
Status
Definition: gdiplustypes.h:24
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
_Out_ PHANDLE EventHandle
Definition: iofuncs.h:855

Referenced by IoCreateNotificationEvent(), and IoCreateSynchronizationEvent().